Home » date » 2010 » Nov » 23 »

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Tue, 23 Nov 2010 22:02:00 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul.htm/, Retrieved Tue, 23 Nov 2010 23:00:09 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
41 12 14 12 39 11 18 11 30 15 11 14 31 6 12 12 34 13 16 21 35 10 18 12 39 12 14 22 34 14 14 11 36 12 15 10 37 6 15 13 38 10 17 10 36 12 19 8 38 12 10 15 39 11 16 14 33 15 18 10 32 12 14 14 36 10 14 14 38 12 17 11 39 11 14 10 32 12 16 13 32 11 18 7 31 12 11 14 39 13 14 12 37 11 12 14 39 9 17 11 41 13 9 9 36 10 16 11 33 14 14 15 33 12 15 14 34 10 11 13 31 12 16 9 27 8 13 15 37 10 17 10 34 12 15 11 34 12 14 13 32 7 16 8 29 6 9 20 36 12 15 12 29 10 17 10 35 10 13 10 37 10 15 9 34 12 16 14 38 15 16 8 35 10 12 14 38 10 12 11 37 12 11 13 38 13 15 9 33 11 15 11 36 11 17 15 38 12 13 11 32 14 16 10 32 10 14 14 32 12 11 18 34 13 12 14 32 5 12 11 37 6 15 12 39 12 16 13 29 12 15 9 37 11 12 10 35 10 12 15 30 7 8 20 38 12 13 12 34 14 11 12 31 11 14 14 34 12 15 13 35 13 10 11 36 14 11 17 30 11 12 12 39 12 15 13 35 12 15 14 38 8 14 13 31 11 16 15 34 14 15 13 38 14 15 10 34 12 13 11 39 9 12 19 37 13 17 13 34 11 13 17 28 12 15 13 37 12 13 9 33 12 15 etc...
 
Output produced by software:

Enter (or paste) a matrix (table) containing all data (time) series. Every column represents a different variable and must be delimited by a space or Tab. Every row represents a period in time (or category) and must be delimited by hard returns. The easiest way to enter data is to copy and paste a block of spreadsheet cells. Please, do not use commas or spaces to seperate groups of digits!


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time7 seconds
R Server'Sir Ronald Aylmer Fisher' @ 193.190.124.24


Multiple Linear Regression - Estimated Regression Equation
Connected[t] = + 32.3319878002113 + 0.073693050794334Software[t] + 0.158414769830047Happiness[t] -0.0578124530341171Depression[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)32.33198780021133.21373510.060600
Software0.0736930507943340.1249310.58990.5561210.27806
Happiness0.1584147698300470.135191.17180.2430450.121523
Depression-0.05781245303411710.100457-0.57550.5657760.282888


Multiple Linear Regression - Regression Statistics
Multiple R0.158387868304105
R-squared0.0250867168259186
Adjusted R-squared0.00657570512008154
F-TEST (value)1.35523207615974
F-TEST (DF numerator)3
F-TEST (DF denominator)158
p-value0.258572965130434
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.36401381269592
Sum Squared Residuals1788.02105125741


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
14134.74036175095476.25963824904534
23935.35814023251453.64185976748549
33034.3705716877792-4.37057168777917
43133.9813739065284-2.98137390652845
53434.6105722641019-0.610572264101918
63535.2266347286861-0.226634728686063
73934.16223722061344.83776277938663
83434.9455603055773-0.94556030557733
93635.01440142685280.985598573147175
103734.39880576298452.60119423701553
113835.18384486492432.81615513507575
123635.76368541224120.236314587758754
133833.9332653125324.06673468746799
143934.86787333375214.13212666624793
153335.710724888726-2.71072488872597
163234.6247368448863-2.62473684488631
173634.47735074329761.52264925670236
183835.27341851347882.7265814865212
193934.78229360622844.21770639377156
203234.9993788375805-2.99937883758052
213235.589390044651-3.58939004465098
223134.1494925353962-3.14949253539617
233934.81405480174894.18594519825112
243734.23421425443192.76578574556812
253935.05233936109583.9476606389042
264134.1954183117016.804581688299
273634.96761764206011.03238235793991
283334.7143104934409-1.71431049344086
293334.7831516147164-1.78315161471636
303434.0599188868416-0.0599188868416191
313135.230628649717-4.23062864971699
322734.1137374188448-7.11373741884481
333735.18384486492431.81615513507575
343434.9565889738187-0.956588973818708
353434.6825492979204-0.682549297920427
363234.9199758487794-2.91997584877944
372933.0436299727654-4.04362997276537
383634.89877652078461.10122347921541
392935.1838448649243-6.18384486492425
403534.55018578560410.449814214395936
413734.92482777829832.07517222170173
423434.9415663845464-0.941566384546404
433835.50952025513412.49047974486589
443534.16052120363760.839478796362451
453834.33395856273993.6660414372601
463734.20730498843032.79269501156971
473835.14590693068132.85409306931872
483334.8828959230244-1.88289592302437
493634.9684756505481.031524349452
503834.63975943415863.36024056584138
513235.3202022982715-3.32020229827154
523234.4773507432976-2.47735074329764
533233.9182427232597-1.9182427232597
543434.3816003560205-0.381600356020551
553233.9654933087682-1.96549330876823
563734.45661821601862.54338178398141
573934.99937883758054.00062116241948
582935.0722138798869-6.07221387988694
593734.46546406656842.53453593343165
603534.10270875060340.897291249396568
613032.9589082537297-2.95890825372966
623834.58194698112453.4180530188755
633434.4125035430531-0.412503543053072
643134.551043794092-3.55104379409198
653434.8409640677505-0.840964067750474
663534.23820817546280.761791824537192
673634.12344127788251.87655872211751
683034.3498391605001-4.34983916050012
693934.84096406775054.15903593224953
703534.78315161471640.216848385283643
713834.38777709474313.61222290525691
723134.8100608807180-3.81006088071795
733434.9883501693391-0.988350169339142
743835.16178752844152.83821247155851
753434.6397594341586-0.639759434158615
763933.79776588767265.20223411232737
773735.23148665820491.7685133417951
783434.2191916651596-0.219191665159578
792834.8409640677505-6.84096406775047
803734.75538434022682.24461565977315
813334.9565889738187-1.95658897381871
823735.17281619668291.82718380331713
833535.0722138798869-0.0722138798869423
843735.05719129061461.94280870938536
853234.8250834699903-2.82508346999026
863334.5351631963318-1.53516319633176
873834.61988491536753.38011508463253
883334.7403617509545-1.74036175095454
892934.4085096220221-5.40850962202215
903333.0533338318030-0.053333831803046
913134.9367144550276-3.93671445502757
923634.62958877440511.37041122559485
933534.84096406775050.159035932249526
943234.5669243918522-2.56692439185219
952934.6975718871927-5.69757188719273
963934.96761764206014.03238235793991
973734.26597544995232.73402455004768
983534.57709505160570.422904948394340
993735.27341851347881.7265814865212
1003234.8670153252642-2.86701532526416
1013835.47861706810162.52138293189841
1023734.11858934836362.88141065163635
1033635.27827044299760.72172955700236
1043234.2492368437042-2.24923684370419
1053334.5938336578538-1.59383365785379
1064033.54360073056556.45639926943451
1073835.11500374364882.88499625635124
1084134.66752670864816.33247329135188
1093633.85957226173772.14042773826233
1104333.04448798125339.95551201874672
1113034.7831516147164-4.78315161471636
1123134.2390661839507-3.23906618395072
1133234.5660663833643-2.56606638336428
1143234.4932313410579-2.49323134105786
1153735.22663472868611.77336527131394
1163735.24650924747721.75349075252279
1173334.6984298956806-1.69842989568064
1183434.3877770947431-0.387777094743091
1193334.8401060592626-1.84010605926256
1203834.56692439185223.43307560814781
1213334.1764018013978-1.17640180139777
1223134.6984298956806-3.69842989568064
1233834.95658897381873.04341102618129
1243735.27741243450971.72258756549027
1253335.0302820246130-2.03028202461304
1263134.8608385865416-3.86083858654162
1273935.29946977099253.70053022900751
1284435.25753791571868.74246208428142
1293335.3691689007559-2.36916890075589
1303534.76727101695610.23272898304386
1313234.4923733325699-2.49237333256995
1322833.4120952267370-5.41209522673704
1334034.71962922367555.28037077632451
1342734.6516461108879-7.6516461108879
1353734.89877652078462.10122347921541
1363234.9415663845464-2.94156638454640
1372833.4081013057061-5.40810130570611
1383434.551043794092-0.551043794091976
1393033.8864815277393-3.88648152773927
1403534.66181677064140.338183229358628
1413134.3608678287415-3.36086782874150
1423234.7196292236755-2.71962922367549
1433034.7204872321634-4.7204872321634
1443034.9614409033375-4.96144090333755
1453134.8250834699903-3.82508346999026
1464034.82023154047145.17976845952858
1473235.130884341409-3.13088434140897
1483634.20730498843031.79269501156971
1493234.4813446643286-2.48134466432857
1503533.32252157818251.67747842181751
1513834.6887260366433.31127396335703
1524234.36657776674827.63342223325176
1533435.009549497334-1.00954949733399
1543533.98137390652841.01862609347155
1553533.24882852738821.75117147261185
1563333.9403000597425-0.940300059742459
1573634.62958877440511.37041122559485
1583234.1825785401203-2.18257854012031
1593335.3691689007559-2.36916890075589
1603434.6816912894325-0.681691289432515
1613233.7818852899124-1.78188528991241
1623434.0559249658107-0.0559249658106935


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
70.9296590753041760.1406818493916480.0703409246958238
80.8706590962029350.2586818075941310.129340903797065
90.7892478009905260.4215043980189480.210752199009474
100.7092574445009830.5814851109980340.290742555499017
110.6117162750158850.7765674499682310.388283724984115
120.5464141320867280.9071717358265440.453585867913272
130.6155024177310210.7689951645379580.384497582268979
140.5722835498920690.8554329002158630.427716450107931
150.5626431202044380.8747137595911250.437356879795562
160.5636751511478170.8726496977043660.436324848852183
170.4804530281700670.9609060563401350.519546971829933
180.4270444180698580.8540888361397160.572955581930142
190.4455416987152460.8910833974304930.554458301284754
200.4777760928273490.9555521856546980.522223907172651
210.5031822295591390.9936355408817210.496817770440861
220.5040260722195580.9919478555608840.495973927780442
230.542388502915750.91522299416850.45761149708425
240.49833185964010.99666371928020.5016681403599
250.474111122542170.948222245084340.52588887745783
260.637117361040830.7257652779183410.362882638959170
270.5765018858454660.8469962283090680.423498114154534
280.5416755686396710.9166488627206590.458324431360329
290.5133477895176140.9733044209647720.486652210482386
300.4695639609075130.9391279218150270.530436039092487
310.5215794324489970.9568411351020070.478420567551003
320.7755783287634670.4488433424730660.224421671236533
330.7380966717007760.5238066565984490.261903328299224
340.6969286261178370.6061427477643250.303071373882163
350.6506155777258340.6987688445483320.349384422274166
360.6454135989208360.7091728021583290.354586401079164
370.6641392199252070.6717215601495870.335860780074794
380.615426309200370.7691473815992610.384573690799631
390.7250947170095480.5498105659809040.274905282990452
400.6789228289138160.6421543421723680.321077171086184
410.6464422919194720.7071154161610560.353557708080528
420.6007303563587040.7985392872825920.399269643641296
430.5649067326293710.8701865347412570.435093267370629
440.5154815709878280.9690368580243450.484518429012172
450.5152237649557280.9695524700885430.484776235044272
460.4870671729794620.9741343459589240.512932827020538
470.460218901921890.920437803843780.53978109807811
480.4301024921033420.8602049842066840.569897507896658
490.3871174133640160.7742348267280310.612882586635984
500.3744995927139220.7489991854278440.625500407286078
510.3911668927162880.7823337854325760.608833107283712
520.3701828596116750.740365719223350.629817140388325
530.3429615289249190.6859230578498370.657038471075081
540.3019769396770990.6039538793541980.698023060322901
550.2710779937482640.5421559874965280.728922006251736
560.2618197972585970.5236395945171930.738180202741404
570.2760496235172920.5520992470345830.723950376482708
580.3887706829900810.7775413659801630.611229317009919
590.3647204682202050.7294409364404110.635279531779795
600.3232172187686440.6464344375372890.676782781231356
610.3104080847575660.6208161695151320.689591915242434
620.306850083403670.613700166807340.69314991659633
630.2712854998361340.5425709996722690.728714500163866
640.2764722411499800.5529444822999590.72352775885002
650.2412264030618070.4824528061236150.758773596938193
660.2090279014116110.4180558028232230.790972098588389
670.1857092490042590.3714184980085170.814290750995741
680.2100128825427590.4200257650855180.789987117457241
690.2267434136062260.4534868272124510.773256586393774
700.1933765796178760.3867531592357520.806623420382124
710.2006373991546440.4012747983092880.799362600845356
720.2098693536708910.4197387073417830.790130646329109
730.1818334992786240.3636669985572480.818166500721376
740.1722263756469860.3444527512939730.827773624353013
750.1463713041174120.2927426082348240.853628695882588
760.1884977823310740.3769955646621480.811502217668926
770.1663093197119340.3326186394238680.833690680288066
780.1393894943610570.2787789887221150.860610505638943
790.2348782643988750.4697565287977490.765121735601125
800.2176289634009690.4352579268019380.782371036599031
810.1960347432372420.3920694864744830.803965256762758
820.1748422121219070.3496844242438130.825157787878093
830.1476457341398640.2952914682797280.852354265860136
840.1307800993487050.2615601986974090.869219900651295
850.1231755566725340.2463511133450670.876824443327466
860.1053262985477180.2106525970954350.894673701452282
870.1056090789962820.2112181579925650.894390921003718
880.09089039951575030.1817807990315010.90910960048425
890.1223071459433840.2446142918867680.877692854056616
900.100554126810490.201108253620980.89944587318951
910.1083334998799530.2166669997599060.891666500120047
920.09199909277967440.1839981855593490.908000907220326
930.0744652627744620.1489305255489240.925534737225538
940.0675550661999520.1351101323999040.932444933800048
950.0958948339105580.1917896678211160.904105166089442
960.1038697432715330.2077394865430660.896130256728467
970.0972699394593450.194539878918690.902730060540655
980.07912688602806280.1582537720561260.920873113971937
990.06725960264008810.1345192052801760.932740397359912
1000.0621152911203750.124230582240750.937884708879625
1010.05687968369699330.1137593673939870.943120316303007
1020.05350740553767780.1070148110753560.946492594462322
1030.04319802492498690.08639604984997370.956801975075013
1040.0368119873853290.0736239747706580.963188012614671
1050.02973714723963130.05947429447926260.970262852760369
1060.06000664830598990.1200132966119800.93999335169401
1070.05731937056719350.1146387411343870.942680629432807
1080.1064554678116310.2129109356232620.89354453218837
1090.09691342888486620.1938268577697320.903086571115134
1100.4094883824114010.8189767648228030.590511617588599
1110.4381803690806290.8763607381612580.561819630919371
1120.4168645435139180.8337290870278370.583135456486082
1130.3944803849665230.7889607699330460.605519615033477
1140.3633325146449520.7266650292899040.636667485355048
1150.3315519491209120.6631038982418240.668448050879088
1160.3011195906979970.6022391813959930.698880409302003
1170.2632762917857730.5265525835715450.736723708214227
1180.2234477292860980.4468954585721960.776552270713902
1190.2005770485513430.4011540971026850.799422951448657
1200.2260116087697660.4520232175395320.773988391230234
1210.1907333000421440.3814666000842880.809266699957856
1220.1804009054136660.3608018108273330.819599094586334
1230.1775940131703320.3551880263406640.822405986829668
1240.1534186528370380.3068373056740770.846581347162962
1250.1289287569257190.2578575138514380.87107124307428
1260.1272340344801650.254468068960330.872765965519835
1270.1245280619042020.2490561238084030.875471938095798
1280.3905164665142420.7810329330284840.609483533485758
1290.3462451668355640.6924903336711280.653754833164436
1300.3023603826873140.6047207653746290.697639617312686
1310.2780057164731080.5560114329462170.721994283526892
1320.3180292185139930.6360584370279860.681970781486007
1330.4061989160838220.8123978321676440.593801083916178
1340.5693614662602250.861277067479550.430638533739775
1350.5600539038704380.8798921922591250.439946096129562
1360.5109547301223790.9780905397552420.489045269877621
1370.6282671780537290.7434656438925420.371732821946271
1380.5618639549420120.8762720901159750.438136045057988
1390.6000279694863160.7999440610273680.399972030513684
1400.5406492152301440.9187015695397130.459350784769856
1410.5225568012832050.954886397433590.477443198716795
1420.4707770559657810.9415541119315610.529222944034219
1430.5207704454640450.958459109071910.479229554535955
1440.5894584162662280.8210831674675440.410541583733772
1450.621032739351690.757934521296620.37896726064831
1460.7930372187845830.4139255624308340.206962781215417
1470.818356068896330.363287862207340.18164393110367
1480.7527837785440370.4944324429119250.247216221455963
1490.7659919409789360.4680161180421280.234008059021064
1500.6760569365494150.647886126901170.323943063450585
1510.8118522704316410.3762954591367180.188147729568359
1520.9959656149387960.008068770122408940.00403438506120447
1530.9870785691229820.02584286175403600.0129214308770180
1540.9859117227628960.02817655447420770.0140882772371038
1550.9801478807381940.03970423852361220.0198521192618061


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level10.00671140939597315OK
5% type I error level40.0268456375838926OK
10% type I error level70.0469798657718121OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul/10qvck1290549709.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul/10qvck1290549709.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul/1jcg91290549709.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul/1jcg91290549709.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul/2c3fu1290549709.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul/2c3fu1290549709.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul/3c3fu1290549709.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul/3c3fu1290549709.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul/4c3fu1290549709.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul/4c3fu1290549709.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul/5c3fu1290549709.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul/5c3fu1290549709.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul/6muex1290549709.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul/6muex1290549709.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul/7fmdi1290549709.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul/7fmdi1290549709.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul/8fmdi1290549709.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul/8fmdi1290549709.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul/9fmdi1290549709.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t1290549609kvdspg8il57ojul/9fmdi1290549709.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by