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:04:55 +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/t12905497787bm4v110ez6xlsj.htm/, Retrieved Tue, 23 Nov 2010 23:03: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/t12905497787bm4v110ez6xlsj.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 time9 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Connected[t] = + 33.0875718780359 + 0.0537248567570098Software[t] + 0.152393156666027Happiness[t] -0.0487180136506633Depression[t] -0.0069668331728648t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)33.08757187803593.2688710.12200
Software0.05372485675700980.1258270.4270.6699840.334992
Happiness0.1523931566660270.1350811.12820.2609710.130486
Depression-0.04871801365066330.100588-0.48430.6288240.314412
t-0.00696683317286480.005744-1.21280.2270140.113507


Multiple Linear Regression - Regression Statistics
Multiple R0.184759663662724
R-squared0.034136133316763
Adjusted R-squared0.0095281367133685
F-TEST (value)1.38719676643868
F-TEST (DF numerator)4
F-TEST (DF denominator)157
p-value0.240829939787867
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation3.35901121152838
Sum Squared Residuals1771.42414211022


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
14135.27419135546405.72580864453596
23935.87179030584853.1282096941515
33034.8668167620895-4.8668167620895
43134.6261554020709-3.6261554020709
53435.1663730700052-1.16637307000524
63535.7414801027494-0.741480102749372
73934.74521021991984.25478978008021
83435.3815912504182-1.38159125041824
93635.46828587404800.531714125951957
103734.99281585938112.00718414061887
113835.65168880752032.34831119247965
123636.1543940284949-0.154394028494883
133834.43486268977313.56513731022687
143935.33724795349013.66275204650992
153336.04483891528-3.04483891527997
163235.0722528305693-3.07225283056931
173634.95783628388241.04216371611757
183835.66165267517362.33834732482635
193935.19249952889643.80750047110364
203235.3978898248606-3.39788982486057
213235.9342925301667-3.93429253016673
223134.573272361534-3.57327236153404
233935.17464588241763.82535411758241
243734.65800699509732.34199300490267
253935.45171027269263.54828972730743
264134.53793364052096.46206635947915
273635.33910830643780.66089169356218
283335.0473825323583-2.04738253235829
293335.1340771559881-2.13407715598809
303434.4588059962878-0.458805996287765
313135.5161267145617-4.51612671456171
322734.5447729024587-7.54477290245874
333735.49841847771731.50158152228268
343435.2453970310758-1.24539703107576
353434.9886010139355-0.988601013935542
363235.261386278563-3.261386278563
372933.549326328163-4.54932632816298
383635.16881168473360.831188315266362
392935.4566174786801-6.45661747868013
403534.84007801884320.159921981156839
413735.1866155126531.81338448734699
423435.1959014814069-1.19590148140688
433835.6424173004092.35758269959098
443534.4649454748830.535054525116978
453834.60413268266213.39586731733785
463734.45478637903602.54521362096405
473835.30598908388692.69401091611315
483335.0941365098986-2.09413650989864
493635.19708393545520.80291606454482
503834.82914138697793.17085861302213
513235.4355217509678-3.43552175096777
523234.7139971228322-2.71399712283216
533234.1624284785726-2.16242847857258
543434.5564517134254-0.556451713425404
553234.2658400671484-2.26584006714845
563734.721059547082.27894045291999
573935.14011699746463.85988300253543
582935.1756290622283-6.17562906222833
593734.60903988864972.39096011135029
603534.30475813046650.695241869533478
613033.2834540321052-3.2834540321052
623834.69682137525283.30317862474717
633434.4925179422619-0.49251794226193
643134.6841199815148-3.68411998151479
653434.9319891754156-0.931989175415625
663534.31421744297100.685782557029038
673634.22106054131721.77893945868285
683034.4489023627926-4.4489023627926
693934.90412184272424.09587815727583
703534.84843699590060.151563004099362
713834.52289559268443.47710440731563
723134.8844536158133-3.88445361581326
733434.9837042235467-0.983704223546727
743835.12289143132592.87710856867415
753434.6549705576562-0.65497055765625
763933.9446918883415.05530811165898
773735.20689834743031.79310165256969
783434.2880371194767-0.288037119476666
792834.8344535109955-6.83445351099552
803734.71757241909332.28242758090675
813334.9179558719511-1.91795587195111
823735.11210020909491.88789979090506
833535.0014582329067-0.0014582329067116
843735.00073051544791.99926948455212
853234.787645668852-2.78764566885198
863334.5258428086054-1.52584280860542
873834.61754427534163.38245572465843
883334.6680768694244-1.66807686942437
892934.3625628386335-5.36256283863349
903333.1002109699098-0.100210969909821
913134.8944632559822-3.89446325598216
923634.50283690938591.49716309061407
933534.73691784657540.263082153424589
943234.4801218294352-2.48012182943519
952934.5643519078496-5.56435190784962
963934.85839681751014.14160318248985
973734.15944185969092.84055814030911
983534.48595198107540.514048018924644
993735.09733918817161.90266081182840
1003234.7268543418033-2.72685434180333
1013835.23957324899062.76042675100944
1023734.01715798031252.98284201968745
1033635.02953525543450.970464744565517
1043234.0944212255541-2.09442122555411
1053334.453436950792-1.45343695079203
1064033.4396819934286.56031800657197
1073834.88921136612273.11078863387734
1084134.48626130803046.51373869196955
1093633.71232184842112.28767815157890
1104333.05199346536429.94800653463577
1113034.5627968358132-4.56279683581318
1123134.0049890758396-3.00498907583957
1133234.3365060403304-2.33650604033038
1143234.2870603092209-2.28706030922089
1153734.98209528690712.01790471309289
1163734.92895273797452.07104726202545
1173334.422327536867-1.42232753686698
1183434.1954544335597-0.195454433559724
1193334.5445342252605-1.54453422526054
1203834.29898416694073.70101583305929
1213333.9335061636788-0.93350616367878
1223134.3874933710026-3.38749337100265
1233834.62534887869083.37465112130921
1243734.87198579998392.12801420001606
1253334.6651400691021-1.66514006910207
1263134.4608366361112-3.46083663611117
1273934.94097218676944.05902781323064
1284434.89029418305229.10970581694782
1293335.0319459360467-2.03194593604668
1303534.42542016242240.574579837577597
1313234.1573781864618-2.1573781864618
1322833.1561014605259-5.15610146052587
1334034.38949913358485.61050086641523
1342734.3001168024296-7.30011680242962
1353734.49302886696582.50697113303425
1363234.5410191631576-2.54101916315759
1372833.1724498535276-5.17244985352759
1383434.1685743267228-0.168574326722795
1393033.5532671394935-3.55326713949351
1403534.29201328772410.707986712275948
1413133.9852669843255-2.98526698432548
1423234.326797635029-2.32679763502899
1433034.3310767606765-4.33107676067650
1443034.4391087820150-4.43910878201497
1453134.3696356784801-3.36963567848009
1464034.40260544535295.59739455464711
1473234.6155448823144-2.61554488231441
1483633.74416939540372.25583060459626
1493233.9870317461982-1.98703174619823
1503532.97196676355092.02803323644905
1513834.26532840908093.73467159091911
1524233.87994117819878.1200588218013
1533434.5049984972012-0.504998497201173
1543533.58113042614121.41886957385882
1553532.88340774092962.11659225907039
1563333.5347315480715-0.534731548071519
1573634.04999275314971.95000724685029
1583233.7606133794804-1.76061337948045
1593334.8229409408607-1.82294094086074
1603434.1065009085071-0.106500908507059
1613233.3475042255412-1.34750422554117
1623433.59036657633570.409633423664343


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.8962439755022550.2075120489954910.103756024497745
90.845289012554690.309421974890620.15471098744531
100.7917146191512720.4165707616974560.208285380848728
110.7067050446331780.5865899107336430.293294955366822
120.6265973252144640.7468053495710720.373402674785536
130.6849942762827290.6300114474345430.315005723717271
140.6138315434043580.7723369131912840.386168456595642
150.634556362044550.7308872759109010.365443637955451
160.6345367394375910.7309265211248190.365463260562409
170.5517111439457340.8965777121085320.448288856054266
180.4966554163223940.9933108326447870.503344583677606
190.4966975313113490.9933950626226980.503302468688651
200.5404535354297930.9190929291404140.459546464570207
210.5542759049815950.8914481900368110.445724095018405
220.5269170727798860.9461658544402280.473082927220114
230.5917675861241150.816464827751770.408232413875885
240.550826876519510.898346246960980.44917312348049
250.5224853863342290.9550292273315430.477514613665771
260.6654342587136580.6691314825726850.334565741286342
270.6084497706343690.7831004587312620.391550229365631
280.5832468407506860.8335063184986290.416753159249314
290.5556845171655940.8886309656688130.444315482834406
300.5081221347876620.9837557304246770.491877865212338
310.5415465167991550.916906966401690.458453483200845
320.7364556176090430.5270887647819140.263544382390957
330.7131972224008730.5736055551982550.286802777599127
340.6624613644854790.6750772710290430.337538635514521
350.6087189091442630.7825621817114730.391281090855737
360.5818412804844850.8363174390310310.418158719515515
370.5727876133413930.8544247733172150.427212386658607
380.5410260685433310.9179478629133390.458973931456669
390.6069166907839540.7861666184320920.393083309216046
400.5659348268656560.8681303462686880.434065173134344
410.5579551834916930.8840896330166140.442044816508307
420.5108870678766240.9782258642467510.489112932123376
430.4973984434186370.9947968868372740.502601556581363
440.4604722809955170.9209445619910330.539527719004483
450.4822233683999480.9644467367998970.517776631600052
460.4664350339873390.9328700679746770.533564966012661
470.450263785403020.900527570806040.54973621459698
480.4104405111154770.8208810222309530.589559488884523
490.3818802912254590.7637605824509180.618119708774541
500.3774571488202710.7549142976405420.622542851179729
510.3774798743969020.7549597487938040.622520125603098
520.3471403623075540.6942807246151090.652859637692446
530.3114638169461870.6229276338923730.688536183053813
540.2689317707903200.5378635415806410.73106822920968
550.2379753261638180.4759506523276360.762024673836182
560.2443765881440220.4887531762880450.755623411855978
570.2753545029439710.5507090058879420.724645497056029
580.3686651320828610.7373302641657210.63133486791714
590.3499222577712170.6998445155424340.650077742228783
600.3124181539653610.6248363079307220.687581846034639
610.2998150395293960.5996300790587920.700184960470604
620.303916327379860.607832654759720.69608367262014
630.2648744960881850.5297489921763690.735125503911815
640.2626454548679740.5252909097359480.737354545132026
650.2273916398522450.4547832797044890.772608360147755
660.1945923060556350.3891846121112700.805407693944365
670.1757734945237140.3515469890474270.824226505476286
680.1946998346600680.3893996693201350.805300165339932
690.2232654748686130.4465309497372260.776734525131387
700.1913564410599610.3827128821199220.808643558940039
710.2033118998818240.4066237997636470.796688100118176
720.2089950235459140.4179900470918280.791004976454086
730.1789937394081890.3579874788163770.821006260591811
740.1717186799727870.3434373599455750.828281320027213
750.1445469116429800.2890938232859610.85545308835702
760.1902382420383430.3804764840766860.809761757961657
770.1689626601395370.3379253202790750.831037339860463
780.1416826356654570.2833652713309140.858317364334543
790.2341195559743520.4682391119487040.765880444025648
800.2161210842180650.4322421684361290.783878915781935
810.1930868150114310.3861736300228620.806913184988569
820.1729869419794950.3459738839589890.827013058020505
830.1450791573737750.2901583147475500.854920842626225
840.1292599587798810.2585199175597630.870740041220119
850.1211538798315510.2423077596631020.878846120168449
860.1040079317061480.2080158634122960.895992068293852
870.1048766043889800.2097532087779590.89512339561102
880.08983719436414220.1796743887282840.910162805635858
890.1216126244980800.2432252489961610.87838737550192
900.1007171852114000.2014343704227990.8992828147886
910.1142775168957010.2285550337914030.885722483104299
920.09719118793685420.1943823758737080.902808812063146
930.07967334273612460.1593466854722490.920326657263875
940.07492992882829820.1498598576565960.925070071171702
950.1122476360501020.2244952721002040.887752363949898
960.1201204579556840.2402409159113680.879879542044316
970.1111745724868490.2223491449736990.88882542751315
980.0926200146137360.1852400292274720.907379985386264
990.07883297081963580.1576659416392720.921167029180364
1000.07933396392756540.1586679278551310.920666036072435
1010.07140963419741770.1428192683948350.928590365802582
1020.06499628173520870.1299925634704170.935003718264791
1030.05203553873462550.1040710774692510.947964461265374
1040.04763762960003350.0952752592000670.952362370399966
1050.0410046114439890.0820092228879780.95899538855601
1060.07051307387248810.1410261477449760.929486926127512
1070.06466871139855820.1293374227971160.935331288601442
1080.1095724366250360.2191448732500720.890427563374964
1090.09598802044862270.1919760408972450.904011979551377
1100.4028298613079320.8056597226158630.597170138692068
1110.4230463065156660.8460926130313320.576953693484334
1120.3984346909668720.7968693819337440.601565309033128
1130.3722514247787860.7445028495575720.627748575221214
1140.3391682280510080.6783364561020160.660831771948992
1150.3096640180293310.6193280360586620.690335981970669
1160.2818255773337250.5636511546674490.718174422666275
1170.2437229583330350.4874459166660700.756277041666965
1180.2049481422728110.4098962845456220.79505185772719
1190.1813000952002030.3626001904004070.818699904799797
1200.2098264889355000.4196529778710010.7901735110645
1210.1755680247528300.3511360495056600.82443197524717
1220.1613289142972780.3226578285945560.838671085702722
1230.1640792724098490.3281585448196980.835920727590151
1240.1437915415717970.2875830831435940.856208458428203
1250.1180810021594310.2361620043188610.88191899784057
1260.1118267209737370.2236534419474740.888173279026263
1270.1146211122035910.2292422244071820.88537888779641
1280.4331488406934030.8662976813868060.566851159306597
1290.3831460968622030.7662921937244060.616853903137797
1300.3596994278982340.7193988557964680.640300572101766
1310.3133063141803620.6266126283607230.686693685819638
1320.3188370609051640.6376741218103280.681162939094836
1330.5023636705129490.9952726589741020.497636329487051
1340.5977133983696770.8045732032606460.402286601630323
1350.6422053753709890.7155892492580220.357794624629011
1360.5838440029131210.8323119941737580.416155997086879
1370.6170191147011720.7659617705976560.382980885298828
1380.5560927706738330.8878144586523350.443907229326167
1390.5510645042740960.8978709914518070.448935495725903
1400.5029764455442640.9940471089114720.497023554455736
1410.4620721036737010.9241442073474020.537927896326299
1420.4010429207411430.8020858414822870.598957079258857
1430.4563880968065960.9127761936131930.543611903193404
1440.5549560814164620.8900878371670760.445043918583538
1450.6824302443484130.6351395113031750.317569755651587
1460.7492148693658230.5015702612683540.250785130634177
1470.8602561445195590.2794877109608810.139743855480441
1480.7967444707231620.4065110585536750.203255529276838
1490.927452205917820.1450955881643620.0725477940821809
1500.937697086851010.1246058262979780.062302913148989
1510.9183949465511030.1632101068977940.0816050534488968
1520.994091159944360.01181768011128040.00590884005564021
1530.9814974060170360.03700518796592890.0185025939829644
1540.956818861669190.08636227666162170.0431811383308109


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level20.0136054421768707OK
10% type I error level50.0340136054421769OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905497787bm4v110ez6xlsj/1077qi1290549883.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905497787bm4v110ez6xlsj/1077qi1290549883.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905497787bm4v110ez6xlsj/10oto1290549883.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905497787bm4v110ez6xlsj/10oto1290549883.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905497787bm4v110ez6xlsj/20oto1290549883.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905497787bm4v110ez6xlsj/20oto1290549883.ps (open in new window)


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


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


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


http://www.freestatistics.org/blog/date/2010/Nov/23/t12905497787bm4v110ez6xlsj/63orc1290549883.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Nov/23/t12905497787bm4v110ez6xlsj/63orc1290549883.ps (open in new window)


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


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


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


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = 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