Home » date » 2008 » May » 07 » attachments

vraag2

R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Wed, 07 May 2008 06:48:55 -0600
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/May/07/t1210164628656pvbxjt0l5s3f.htm/, Retrieved Wed, 07 May 2008 14:50:41 +0200
 
User-defined keywords:
s0171333
 
Dataseries X:
» Textbox « » Textfile « » CSV «
112 118 132 129 121 135 148 148 136 119 104 118 115 126 141 135 125 149 170 170 158 133 114 140 145 150 178 163 172 178 199 199 184 162 146 166 171 180 193 181 183 218 230 242 209 191 172 194 196 196 236 235 229 243 264 272 237 211 180 201 204 188 235 227 234 264 302 293 259 229 203 229 242 233 267 269 270 315 364 347 312 274 237 278 284 277 317 313 318 374 413 405 355 306 271 306 315 301 356 348 355 422 465 467 404 347 305 336 340 318 362 348 363 435 491 505 404 359 310 337 360 342 406 396 420 472 548 559 463 407 362 405 417 391 419 461 472 535 622 606 508 461 390 432
 
Text written by user:
 
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 time10 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Sales[t] = + 54.3276515151515 + 9.1802884615385M1[t] -0.230040792540811M2[t] + 32.2762966200467M3[t] + 26.5326340326341M4[t] + 28.6223047785547M5[t] + 65.7953088578089M6[t] + 102.801646270396M7[t] + 99.891317016317M8[t] + 48.5643210955711M9[t] + 10.0706585081584M10[t] -26.3396707459207M11[t] + 2.66032925407925t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)54.32765151515158.6511846.279800
M19.180288461538510.7650610.85280.3953350.197667
M2-0.23004079254081110.762324-0.02140.9829790.49149
M332.276296620046710.7598482.99970.0032360.001618
M426.532634032634110.7576312.46640.014940.00747
M528.622304778554710.7556752.66110.0087620.004381
M665.795308857808910.7539796.118200
M7102.80164627039610.7525449.560700
M899.89131701631710.751379.29100
M948.564321095571110.7504564.51741.4e-057e-06
M1010.070658508158410.7498040.93680.3505740.175287
M11-26.339670745920710.749413-2.45030.0155920.007796
t2.660329254079250.05296850.22500


Multiple Linear Regression - Regression Statistics
Multiple R0.977686415545304
R-squared0.955870727141825
Adjusted R-squared0.951828351002145
F-TEST (value)236.462588861774
F-TEST (DF numerator)12
F-TEST (DF denominator)131
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation26.3302560527953
Sum Squared Residuals90819.9922785548


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
111266.168269230769245.8317307692308
211859.418269230769558.5817307692305
313294.584935897435937.4150641025641
412991.501602564102637.4983974358974
512196.25160256410324.7483974358971
6135136.084935897436-1.08493589743575
7148175.751602564103-27.7516025641026
8148175.501602564103-27.5016025641027
9136126.8349358974369.16506410256397
1011991.001602564102627.9983974358974
1110457.251602564102446.7483974358976
1211886.251602564102631.7483974358974
1311598.092220279720416.9077797202796
1412691.342220279720234.6577797202798
15141126.50888694638714.4911130536130
16135123.42555361305411.5744463869464
17125128.175553613054-3.17555361305357
18149168.008886946387-19.0088869463869
19170207.675553613054-37.6755536130536
20170207.425553613054-37.4255536130536
21158158.758886946387-0.758886946386897
22133122.92555361305410.0744463869464
2311489.175553613053624.8244463869464
24140118.17555361305421.8244463869464
25145130.01617132867114.9838286713288
26150123.26617132867126.7338286713287
27178158.43283799533819.567162004662
28163155.3495046620057.65049533799537
29172160.09950466200511.9004953379954
30178199.932837995338-21.932837995338
31199239.599504662005-40.5995046620046
32199239.349504662005-40.3495046620047
33184190.682837995338-6.68283799533796
34162154.8495046620057.15049533799535
35146121.09950466200524.9004953379953
36166150.09950466200515.9004953379953
37171161.9401223776229.05987762237771
38180155.19012237762224.8098776223777
39193190.3567890442892.64321095571093
40181187.273455710956-6.2734557109557
41183192.023455710956-9.02345571095565
42218231.856789044289-13.8567890442891
43230271.523455710956-41.5234557109557
44242271.273455710956-29.2734557109557
45209222.606789044289-13.6067890442890
46191186.7734557109564.22654428904431
47172153.02345571095618.9765442890443
48194182.02345571095611.9765442890443
49196193.8640734265732.13592657342668
50196187.1140734265738.88592657342664
51236222.2807400932413.7192599067599
52235219.19740675990715.8025932400933
53229223.9474067599075.05259324009328
54243263.78074009324-20.7807400932401
55264303.447406759907-39.4474067599067
56272303.197406759907-31.1974067599068
57237254.53074009324-17.5307400932401
58211218.697406759907-7.69740675990677
59180184.947406759907-4.94740675990677
60201213.947406759907-12.9474067599068
61204225.788024475524-21.7880244755244
62188219.038024475524-31.0380244755244
63235254.204691142191-19.2046911421911
64227251.121357808858-24.1213578088578
65234255.871357808858-21.8713578088578
66264295.704691142191-31.7046911421912
67302335.371357808858-33.3713578088578
68293335.121357808858-42.1213578088578
69259286.454691142191-27.4546911421911
70229250.621357808858-21.6213578088578
71203216.871357808858-13.8713578088578
72229245.871357808858-16.8713578088579
73242257.711975524475-15.7119755244755
74233250.961975524476-17.9619755244755
75267286.128642191142-19.1286421911422
76269283.045308857809-14.0453088578088
77270287.795308857809-17.7953088578088
78315327.628642191142-12.6286421911422
79364367.295308857809-3.29530885780887
80347367.045308857809-20.0453088578089
81312318.378642191142-6.3786421911422
82274282.545308857809-8.54530885780889
83237248.795308857809-11.7953088578089
84278277.7953088578090.204691142191113
85284289.635926573427-5.63592657342652
86277282.885926573427-5.88592657342655
87317318.052593240093-1.05259324009325
88313314.96925990676-1.96925990675991
89318319.71925990676-1.71925990675988
90374359.55259324009314.4474067599067
91413399.2192599067613.7807400932401
92405398.969259906766.03074009324011
93355350.3025932400934.69740675990674
94306314.46925990676-8.46925990675994
95271280.71925990676-9.71925990675992
96306309.71925990676-3.71925990675993
97315321.559877622378-6.55987762237756
98301314.809877622378-13.8098776223776
99356349.9765442890446.02345571095569
100348346.8932109557111.10678904428908
101355351.6432109557113.35678904428909
102422391.47654428904430.5234557109557
103465431.14321095571133.8567890442890
104467430.89321095571136.1067890442891
105404382.22654428904421.7734557109557
106347346.3932109557110.606789044289013
107305312.643210955711-7.64321095571099
108336341.643210955711-5.64321095571105
109340353.483828671329-13.4838286713286
110318346.733828671329-28.7338286713287
111362381.900495337995-19.9004953379954
112348378.817162004662-30.817162004662
113363383.567162004662-20.567162004662
114435423.40049533799511.5995046620046
115491463.06716200466227.932837995338
116505462.81716200466242.182837995338
117404414.150495337995-10.1504953379953
118359378.317162004662-19.317162004662
119310344.567162004662-34.567162004662
120337373.567162004662-36.5671620046621
121360385.407779720280-25.4077797202797
122342378.657779720280-36.6577797202797
123406413.824446386946-7.82444638694645
124396410.741113053613-14.7411130536131
125420415.4911130536134.50888694638699
126472455.32444638694616.6755536130536
127548494.99111305361353.008886946387
128559494.74111305361364.258886946387
129463446.07444638694616.9255536130537
130407410.241113053613-3.241113053613
131362376.491113053613-14.4911130536131
132405405.491113053613-0.491113053613119
133417417.331730769231-0.331730769230757
134391410.581730769231-19.5817307692308
135419445.748397435898-26.7483974358975
136461442.66506410256418.3349358974359
137472447.41506410256424.5849358974359
138535487.24839743589747.7516025641025
139622526.91506410256495.084935897436
140606526.66506410256479.3349358974359
141508477.99839743589730.0016025641026
142461442.16506410256418.8349358974360
143390408.415064102564-18.4150641025641
144432437.415064102564-5.4150641025641


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
160.0006234245168604950.001246849033720990.99937657548314
175.92474885728363e-050.0001184949771456730.999940752511427
185.91990749950453e-050.0001183981499900910.999940800925005
190.000214090978864630.000428181957729260.999785909021135
200.0001604284068148520.0003208568136297030.999839571593185
217.88328030282993e-050.0001576656060565990.999921167196972
221.73775560168854e-053.47551120337708e-050.999982622443983
234.07407005744719e-068.14814011489437e-060.999995925929943
242.00695191234328e-064.01390382468656e-060.999997993048088
251.61735263675228e-063.23470527350457e-060.999998382647363
266.20003378279162e-071.24000675655832e-060.999999379996622
272.21029678934956e-064.42059357869912e-060.99999778970321
287.57101273995387e-071.51420254799077e-060.999999242898726
294.12624509153263e-068.25249018306526e-060.999995873754908
301.65263699840193e-063.30527399680386e-060.999998347363002
311.04796458651111e-062.09592917302221e-060.999998952035414
326.27709909227118e-071.25541981845424e-060.99999937229009
332.29028489166292e-074.58056978332584e-070.999999770971511
348.36302512198077e-081.67260502439615e-070.999999916369749
354.26841516862576e-088.53683033725153e-080.999999957315848
361.87241729002386e-083.74483458004773e-080.999999981275827
377.44648368208907e-091.48929673641781e-080.999999992553516
385.1347787837729e-091.02695575675458e-080.99999999486522
391.85337224127325e-093.70674448254651e-090.999999998146628
407.17949180351111e-101.43589836070222e-090.99999999928205
412.13118063661641e-104.26236127323282e-100.999999999786882
429.83982099014542e-101.96796419802908e-090.999999999016018
431.27746991227612e-092.55493982455225e-090.99999999872253
441.01097168745018e-082.02194337490035e-080.999999989890283
453.61532035277831e-097.23064070555661e-090.99999999638468
461.74727529154706e-093.49455058309412e-090.999999998252725
471.37151594103750e-092.74303188207499e-090.999999998628484
489.18052609309558e-101.83610521861912e-090.999999999081947
494.56468423030908e-109.12936846061817e-100.999999999543532
505.5717206076556e-101.11434412153112e-090.999999999442828
511.62853723822144e-093.25707447644288e-090.999999998371463
521.63291837765581e-083.26583675531161e-080.999999983670816
533.31656482964461e-086.63312965928923e-080.999999966834352
542.1179762248791e-084.2359524497582e-080.999999978820238
554.64347021194912e-089.28694042389823e-080.999999953565298
561.19269164238994e-072.38538328477989e-070.999999880730836
575.27295843789275e-081.05459168757855e-070.999999947270416
583.09919596729374e-086.19839193458749e-080.99999996900804
599.05124271801159e-081.81024854360232e-070.999999909487573
601.46704020663494e-072.93408041326988e-070.99999985329598
612.60192394798681e-075.20384789597362e-070.999999739807605
621.02562126228308e-052.05124252456615e-050.999989743787377
638.84343285793995e-061.76868657158799e-050.999991156567142
646.9799745915434e-061.39599491830868e-050.999993020025408
653.75520128648219e-067.51040257296439e-060.999996244798714
663.58794286196063e-067.17588572392127e-060.999996412057138
673.98505942922163e-057.97011885844326e-050.999960149405708
680.0002539908161763990.0005079816323527970.999746009183824
690.0002038506481014640.0004077012962029280.999796149351899
700.0001350603332620580.0002701206665241150.999864939666738
710.0001297941438702170.0002595882877404350.99987020585613
728.6837036137072e-050.0001736740722741440.999913162963863
735.27869341533148e-050.0001055738683066300.999947213065847
744.60440740596932e-059.20881481193863e-050.99995395592594
752.71866512556183e-055.43733025112367e-050.999972813348744
761.71879978571726e-053.43759957143451e-050.999982812002143
771.12069497913708e-052.24138995827416e-050.999988793050209
785.92178378909915e-050.0001184356757819830.99994078216211
790.004960879881845550.00992175976369110.995039120118154
800.04635303077697740.09270606155395480.953646969223023
810.05232615884529330.1046523176905870.947673841154707
820.04185219272491950.0837043854498390.95814780727508
830.03566267758370080.07132535516740160.9643373224163
840.03651169747866090.07302339495732180.96348830252134
850.03272816582748450.0654563316549690.967271834172515
860.03803673308527380.07607346617054760.961963266914726
870.04230881695674420.08461763391348840.957691183043256
880.04306291963401730.08612583926803460.956937080365983
890.04290466822400210.08580933644800420.957095331775998
900.1057913161212800.2115826322425610.89420868387872
910.3204422599388630.6408845198777270.679557740061137
920.5985377320066830.8029245359866350.401462267993317
930.5889085296558420.8221829406883160.411091470344158
940.5348562899942650.930287420011470.465143710005735
950.5228605802409370.9542788395181260.477139419759063
960.5133560361714790.9732879276570420.486643963828521
970.4890415153389850.978083030677970.510958484661015
980.5134481971772820.9731036056454350.486551802822718
990.6386836711205230.7226326577589540.361316328879477
1000.6719274339122570.6561451321754860.328072566087743
1010.6722688151373220.6554623697253550.327731184862678
1020.8038400330389880.3923199339220240.196159966961012
1030.8843738791508280.2312522416983440.115626120849172
1040.9301729252866330.1396541494267330.0698270747133667
1050.954404822468520.09119035506296170.0455951775314809
1060.9574109611670210.08517807766595730.0425890388329786
1070.9854325592329880.02913488153402420.0145674407670121
1080.996377510412510.007244979174981030.00362248958749052
1090.997279512840730.005440974318538240.00272048715926912
1100.9985436679197370.002912664160525010.00145633208026250
1110.9992454067744970.001509186451006100.000754593225503048
1120.9986610924216680.002677815156663850.00133890757833193
1130.9976606988014860.004678602397027690.00233930119851384
1140.9964678600565630.007064279886874730.00353213994343737
1150.997766731647020.004466536705960170.00223326835298008
1160.9974897262771930.005020547445614060.00251027372280703
1170.9954999172024480.00900016559510430.00450008279755215
1180.991253701122830.01749259775434030.00874629887717016
1190.9858393564371920.02832128712561590.0141606435628079
1200.9779273801132650.04414523977347080.0220726198867354
1210.9636879564613630.07262408707727320.0363120435386366
1220.938529627479810.1229407450403780.0614703725201888
1230.973947468166860.05210506366628070.0260525318331403
1240.9617902886431860.07641942271362840.0382097113568142
1250.9244449237288160.1511101525423670.0755550762711835
1260.8952939029637120.2094121940725750.104706097036288
1270.9660312413431950.06793751731361090.0339687586568055
1280.9265811855076440.1468376289847110.0734188144923555


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level740.654867256637168NOK
5% type I error level780.690265486725664NOK
10% type I error level930.823008849557522NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210164628656pvbxjt0l5s3f/10oxsj1210164524.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210164628656pvbxjt0l5s3f/10oxsj1210164524.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210164628656pvbxjt0l5s3f/1smxe1210164523.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210164628656pvbxjt0l5s3f/1smxe1210164523.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210164628656pvbxjt0l5s3f/2k7gv1210164523.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210164628656pvbxjt0l5s3f/2k7gv1210164523.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210164628656pvbxjt0l5s3f/3frk41210164523.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210164628656pvbxjt0l5s3f/3frk41210164523.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210164628656pvbxjt0l5s3f/4f1y31210164523.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210164628656pvbxjt0l5s3f/4f1y31210164523.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210164628656pvbxjt0l5s3f/5rp7e1210164523.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210164628656pvbxjt0l5s3f/5rp7e1210164523.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210164628656pvbxjt0l5s3f/6xddh1210164523.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210164628656pvbxjt0l5s3f/6xddh1210164523.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210164628656pvbxjt0l5s3f/7evki1210164523.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210164628656pvbxjt0l5s3f/7evki1210164523.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210164628656pvbxjt0l5s3f/8cuom1210164523.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210164628656pvbxjt0l5s3f/8cuom1210164523.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210164628656pvbxjt0l5s3f/92qm21210164524.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/May/07/t1210164628656pvbxjt0l5s3f/92qm21210164524.ps (open in new window)


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