Home » date » 2010 » Dec » 25 »

Multiple Regression 2

*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: Sat, 25 Dec 2010 15:04:54 +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/Dec/25/t12932894348eq6r21qargr60m.htm/, Retrieved Sat, 25 Dec 2010 16:03:56 +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/Dec/25/t12932894348eq6r21qargr60m.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 «
12 2 53 10 7 6 0 9 11 2 86 12 5 6 0 9 14 4 66 11 7 11 0 9 12 3 67 10 3 7 1 9 21 4 76 12 7 12 0 9 12 3 78 12 7 8 0 9 22 3 53 14 7 7 0 9 11 4 80 14 1 11 0 9 10 3 74 11 4 8 0 9 13 4 76 11 5 9 0 9 10 3 79 13 6 9 1 9 8 2 54 11 4 6 0 9 15 3 67 10 7 9 1 9 10 3 87 14 6 5 0 9 14 3 58 14 2 9 1 9 14 2 75 12 2 4 1 9 11 3 88 11 6 9 0 9 10 2 64 10 7 6 1 9 13 4 57 12 5 8 0 9 7 5 66 10 2 12 1 9 12 3 54 14 7 7 0 9 14 3 56 12 4 8 0 9 11 1 86 13 5 3 1 9 9 4 80 13 5 9 0 9 11 3 76 12 5 7 1 9 15 4 69 14 3 9 0 9 13 3 67 11 5 9 1 9 9 3 80 12 1 7 0 9 15 1 54 13 1 5 1 9 10 4 71 11 3 8 0 9 11 4 84 11 2 7 0 9 13 2 74 14 3 6 1 9 8 2 71 12 2 6 1 9 20 1 63 13 5 4 1 9 12 3 71 11 2 8 1 9 10 4 76 13 3 8 0 9 10 1 69 13 4 3 1 9 9 3 74 13 6 8 1 9 14 3 75 12 2 9 0 9 8 2 54 14 7 6 1 9 14 4 52 14 6 9 1 9 11 3 69 8 5 5 0 9 13 3 68 13 3 8 0 9 11 2 75 11 3 6 0 9 11 3 75 13 4 9 1 9 10 2 72 10 5 8 0 9 14 1 67 10 2 5 1 9 18 3 63 13 7 9 1 9 14 3 62 12 6 8 0 9 11 5 63 16 5 11 1 9 12 1 76 13 6 7 0 9 13 3 74 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'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
Depressie[t] = + 6.83819967635574 -0.114673066891991Leeftijd[t] -0.0937460780704117Sportgerelateerde_groep[t] + 0.466815574575993Stress[t] + 0.260747924507668Veranderingen_verleden[t] + 0.297659363826662Alcoholgebruik[t] -0.357602662543149Depressie_mannen[t] + 0.369370037808583Depressie_oktober[t] + 0.00235586693461173t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)6.838199676355747.7342830.88410.378180.18909
Leeftijd-0.1146730668919910.411141-0.27890.7807340.390367
Sportgerelateerde_groep-0.09374607807041170.02383-3.93390.0001336.6e-05
Stress0.4668155745759930.1655562.81970.0055260.002763
Veranderingen_verleden0.2607479245076680.1382611.88590.061440.03072
Alcoholgebruik0.2976593638266620.1732451.71810.0880460.044023
Depressie_mannen-0.3576026625431490.537147-0.66570.5067020.253351
Depressie_oktober0.3693700378085830.8204220.45020.6532690.326634
t0.002355866934611730.009820.23990.8107720.405386


Multiple Linear Regression - Regression Statistics
Multiple R0.470096264194295
R-squared0.220990497609432
Adjusted R-squared0.175166409233517
F-TEST (value)4.82258361140864
F-TEST (DF numerator)8
F-TEST (DF denominator)136
p-value3.0413779014804e-05
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation2.88249480486812
Sum Squared Residuals1129.99357681247


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
11213.2463450123254-1.24634501232539
21110.56721560307310.432784396926941
31413.75812399120460.241876008795425
41210.72335945650431.2766405434957
52113.58984988277237.41015011722766
61212.3287492051515-0.328749205151467
72215.31072880917176.6892711908283
81112.2934174095738-1.29341740957384
91011.461741770138-1.46174177013795
101311.72033970237411.27966029762592
111012.392906813106-2.39290681310595
12812.8630852715887-4.86308527158869
131512.38287268459982.61712731540019
141011.283786571159-1.28378657115899
151413.79482179686840.205178203131633
16149.896239435212674.10376056478732
171110.98729882547110.0127011745289203
181011.8975852288961-1.8975852288961
191313.6918741988727-0.691874198872739
20711.8530021663702-4.85300216637016
211215.2499648681858-3.24996486818585
221413.64661302013130.353386979868692
23119.947596696144751.05240330385525
24912.311968676329-3.31196867632898
251111.3842449576648-0.384244957664766
261513.29320699453341.70679300546661
271312.3611745472450.638825452754973
28910.3309392106994-1.33093921069943
291512.51393342562832.48606657437175
301011.4170322185764-1.41703221857637
31119.64228178226131.3577182177387
321311.81737718554981.18262281445015
33810.906592213036-2.90659221303604
342012.42733039187167.57266960812838
351210.92513403309061.07486596690939
361011.896068178984-1.89606817898397
371011.3135142359186-1.31351423591865
38912.6275862468659-3.62758624686587
391411.68165078949322.31834921050679
40814.7541373804657-6.75413738046565
411415.3468694367294-1.34686943672942
42119.97553887863191.0244611213681
431312.77720093898150.222799061018461
441110.70905744950990.290942550490051
451112.3264947521491-1.32649475214906
461011.6450064196831-1.64500641968308
471410.19794121631563.8020587836844
481814.24075906332083.75924093667916
491413.66924080795870.330759192041309
501115.4903942657721-4.49039426577205
511212.7600097933755-0.760009793375463
521312.58826691123660.411733088763421
53912.4784316373264-3.47843163732641
541011.8076262116177-1.80762621161773
551513.15330512125671.84669487874327
562014.88557732948995.11442267051015
571212.1672729992236-0.167272999223579
581213.1948022353324-1.19480223533235
591413.11056164815190.889438351848071
601313.6529888580294-0.652988858029378
611110.76289849582270.237101504177274
621714.45478899310322.54521100689677
631213.4703397530705-1.47033975307047
641315.0054256346264-2.00542563462636
651414.27068866753-0.270688667530026
661311.91561521783811.08438478216186
671515.4539639751776-0.453963975177584
681312.50826448425540.491735515744601
691011.7490207486865-1.74902074868649
701110.45591976252190.54408023747809
711314.0271846045951-1.0271846045951
721712.92890747594054.07109252405953
731313.4341451784999-0.434145178499948
74913.4369904458717-4.43699044587171
751111.2378304697267-0.237830469726695
761015.0009559936661-5.00095599366615
77912.570208357538-3.57020835753803
781212.3387617252187-0.338761725218668
791212.0003312219935-0.000331221993505235
801312.14704426134970.852955738650269
811312.3683435688850.631656431114986
822215.43046451147026.56953548852985
831313.2158094852649-0.215809485264872
841515.4801836268806-0.480183626880643
851311.31658703004711.68341296995286
861512.32448210899572.67551789100434
871014.0610488439968-4.06104884399675
881111.400068552919-0.400068552919048
891612.98672604894923.01327395105079
901111.6291838822481-0.629183882248089
911111.0473791268677-0.0473791268676598
921012.0399612331697-2.03996123316967
931012.5459946202631-2.5459946202631
941613.39178712183242.60821287816755
951212.6597654048493-0.659765404849253
961113.1421716061762-2.14217160617622
971613.4277087391962.57229126080403
981913.21620035947735.78379964052272
991112.4316266687934-1.43162666879344
1001513.5120730723571.48792692764305
1012417.972049695246.02795030476001
1021411.15396682010452.84603317989555
1031514.6243077440540.375692255945983
1041111.0401334375755-0.0401334375755472
1051515.9982709935626-0.99827099356259
1061213.5293946437637-1.52939464376369
1071010.2217790118711-0.221779011871085
1081414.707677883219-0.707677883218995
109913.6289649847128-4.62896498471277
1101511.33339492703643.66660507296362
1111512.88025874552082.11974125447916
1121411.15871044698712.84128955301294
1131111.8234596834956-0.82345968349563
114813.0445145653456-5.0445145653456
1151112.0558375341057-1.05583753410566
116810.0018131730916-2.00181317309158
1171012.4921710884259-2.49217108842594
1181113.1844651193203-2.18446511932031
1191314.548092788969-1.54809278896896
1201113.6912733437775-2.69127334377751
1212013.08245646371456.91754353628548
1221013.5649341504054-3.5649341504054
1231212.6348589368471-0.634858936847107
1241413.63998304747620.360016952523753
1252315.11374970871297.8862502912871
1261412.92184847390611.07815152609386
1271614.09318908593561.90681091406436
1281114.4631975637828-3.46319756378277
1291213.0440987807509-1.04409878075085
1301013.6525837163621-3.65258371636212
1311412.89285533015921.10714466984081
132129.293885667569192.70611433243082
1331212.5234513601797-0.523451360179669
1341111.1860224477108-0.186022447710815
1351213.1486680454118-1.14866804541178
1361313.6472982457722-0.647298245772176
1371713.15046117411583.84953882588421
138913.0528194607799-4.05281946077994
1391214.4667069745839-2.46670697458386
1401913.27814367801985.72185632198019
1411515.6144680421535-0.614468042153512
1421414.4204420064533-0.420442006453278
1431113.2433617926856-2.24336179268561
144911.8843791574773-2.88437915747732
1451813.42971211798464.57028788201542


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
120.9176494856458830.1647010287082350.0823505143541175
130.9273667161352940.1452665677294110.0726332838647056
140.8867322991088130.2265354017823750.113267700891187
150.8239761318763440.3520477362473120.176023868123656
160.951213531233540.09757293753291960.0487864687664598
170.93104236664370.1379152667126010.0689576333563005
180.9047772731743860.1904454536512280.0952227268256138
190.8680444630937560.2639110738124880.131955536906244
200.8881895382081060.2236209235837880.111810461791894
210.8778956807984450.2442086384031090.122104319201554
220.8839991555252340.2320016889495330.116000844474766
230.853564720121370.292870559757260.14643527987863
240.8249275456607670.3501449086784660.175072454339233
250.7744233106401170.4511533787197670.225576689359883
260.7846447937762880.4307104124474240.215355206223712
270.751259633122380.4974807337552410.248740366877621
280.7092215138508290.5815569722983420.290778486149171
290.6998375006491680.6003249987016640.300162499350832
300.6527331872533020.6945336254933960.347266812746698
310.665963746487590.668072507024820.33403625351241
320.6090494235297020.7819011529405970.390950576470298
330.5884844392944830.8230311214110350.411515560705517
340.8175280454094560.3649439091810890.182471954590544
350.78565077646920.4286984470616010.214349223530801
360.7478723151801650.504255369639670.252127684819835
370.7250864839873190.5498270320253630.274913516012681
380.7520295740875910.4959408518248170.247970425912409
390.746859174479810.5062816510403810.253140825520191
400.8800381440411630.2399237119176740.119961855958837
410.8558649141887650.288270171622470.144135085811235
420.8431048426164820.3137903147670370.156895157383518
430.808588483738950.38282303252210.19141151626105
440.7684259491394890.4631481017210230.231574050860511
450.7286063558066580.5427872883866840.271393644193342
460.6930153720630810.6139692558738370.306984627936919
470.7152850343014540.5694299313970910.284714965698546
480.7676262947773830.4647474104452340.232373705222617
490.726932422218930.5461351555621420.273067577781071
500.754713187888730.490573624222540.24528681211127
510.7223946960041170.5552106079917660.277605303995883
520.6795927183260160.6408145633479680.320407281673984
530.689285531012050.6214289379758990.31071446898795
540.6633065078446250.673386984310750.336693492155375
550.6536442285790050.692711542841990.346355771420995
560.7391752641812590.5216494716374830.260824735818741
570.6969444314665340.6061111370669330.303055568533466
580.661354808046990.677290383906020.33864519195301
590.6156978079656530.7686043840686940.384302192034347
600.5726869954869790.8546260090260420.427313004513021
610.5299719042036030.9400561915927940.470028095796397
620.5124936307191470.9750127385617070.487506369280853
630.485986937757390.971973875514780.51401306224261
640.454122726759070.908245453518140.54587727324093
650.4086645532877290.8173291065754580.591335446712271
660.3709563965157090.7419127930314170.629043603484291
670.3306410931249010.6612821862498020.669358906875099
680.2898772700430130.5797545400860260.710122729956987
690.2591844771566960.5183689543133910.740815522843304
700.2219918591466610.4439837182933210.77800814085334
710.1903784773805210.3807569547610430.809621522619479
720.2272126440676680.4544252881353360.772787355932332
730.1913507431790030.3827014863580060.808649256820997
740.2325424080634830.4650848161269660.767457591936517
750.1969337912329310.3938675824658630.803066208767068
760.2735247356766980.5470494713533960.726475264323302
770.2912418323652960.5824836647305910.708758167634704
780.2686930641893140.5373861283786290.731306935810686
790.232386502592270.464773005184540.76761349740773
800.2006882284466740.4013764568933480.799311771553326
810.1741827202526340.3483654405052680.825817279747366
820.3208312860157970.6416625720315950.679168713984203
830.2777258744044470.5554517488088930.722274125595553
840.241318512950140.482637025900280.75868148704986
850.2134715371706180.4269430743412360.786528462829382
860.2017631350457750.403526270091550.798236864954225
870.2368484417381930.4736968834763850.763151558261807
880.1997723574372380.3995447148744760.800227642562762
890.2009803568892550.401960713778510.799019643110745
900.16890370253080.33780740506160.8310962974692
910.1385230095908040.2770460191816080.861476990409196
920.1266007048867490.2532014097734970.873399295113251
930.1195654209769210.2391308419538430.880434579023079
940.1104772685578740.2209545371157480.889522731442126
950.08983629150044070.1796725830008810.91016370849956
960.08385124836558470.1677024967311690.916148751634415
970.07584430705566830.1516886141113370.924155692944332
980.1226574870070970.2453149740141950.877342512992903
990.1016665468284290.2033330936568580.89833345317157
1000.08292785542281840.1658557108456370.917072144577182
1010.1742964142448790.3485928284897570.825703585755121
1020.1713854747218330.3427709494436670.828614525278167
1030.1541239122181340.3082478244362670.845876087781866
1040.1252436293441860.2504872586883730.874756370655814
1050.0993270393482480.1986540786964960.900672960651752
1060.079136358216170.158272716432340.92086364178383
1070.05997414646995060.1199482929399010.94002585353005
1080.04529714955243280.09059429910486560.954702850447567
1090.05839550713773460.1167910142754690.941604492862265
1100.08534541239418150.1706908247883630.914654587605819
1110.07050347902570090.1410069580514020.9294965209743
1120.08172620451557170.1634524090311430.918273795484428
1130.06640781859954730.1328156371990950.933592181400453
1140.07622120798131150.1524424159626230.923778792018689
1150.05636372787220620.1127274557444120.943636272127794
1160.04489646106539670.08979292213079340.955103538934603
1170.03665792736315970.07331585472631940.96334207263684
1180.02616478207868830.05232956415737670.973835217921312
1190.01784226509463250.0356845301892650.982157734905368
1200.02004661016413330.04009322032826660.979953389835867
1210.05488202071324890.1097640414264980.945117979286751
1220.0649141528944040.1298283057888080.935085847105596
1230.0481659353671350.096331870734270.951834064632865
1240.03491308017681010.06982616035362020.96508691982319
1250.2263652546749160.4527305093498320.773634745325084
1260.4662665400361170.9325330800722350.533733459963883
1270.563814142523860.872371714952280.43618585747614
1280.4742549687072040.9485099374144080.525745031292796
1290.3893410558594140.7786821117188280.610658944140586
1300.3121985288023980.6243970576047950.687801471197602
1310.308823815777840.617647631555680.69117618422216
1320.2076717086672360.4153434173344720.792328291332764
1330.2217805885432620.4435611770865240.778219411456738


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level00OK
5% type I error level20.0163934426229508OK
10% type I error level90.0737704918032787OK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932894348eq6r21qargr60m/1019gi1293289483.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932894348eq6r21qargr60m/1019gi1293289483.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t12932894348eq6r21qargr60m/1c8jo1293289483.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932894348eq6r21qargr60m/1c8jo1293289483.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t12932894348eq6r21qargr60m/250jr1293289483.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932894348eq6r21qargr60m/250jr1293289483.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t12932894348eq6r21qargr60m/350jr1293289483.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932894348eq6r21qargr60m/350jr1293289483.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t12932894348eq6r21qargr60m/450jr1293289483.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932894348eq6r21qargr60m/450jr1293289483.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t12932894348eq6r21qargr60m/5f9iu1293289483.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932894348eq6r21qargr60m/5f9iu1293289483.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t12932894348eq6r21qargr60m/6f9iu1293289483.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932894348eq6r21qargr60m/6f9iu1293289483.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t12932894348eq6r21qargr60m/7qihe1293289483.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932894348eq6r21qargr60m/7qihe1293289483.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t12932894348eq6r21qargr60m/8qihe1293289483.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932894348eq6r21qargr60m/8qihe1293289483.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/25/t12932894348eq6r21qargr60m/919gi1293289483.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/25/t12932894348eq6r21qargr60m/919gi1293289483.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