Home » date » 2008 » Dec » 22 »

*Unverified author*
R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Mon, 22 Dec 2008 05:56:16 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Dec/22/t1229950740eo31tpzq64x43nr.htm/, Retrieved Mon, 22 Dec 2008 13:59:10 +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/2008/Dec/22/t1229950740eo31tpzq64x43nr.htm/},
    year = {2008},
}
@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 = {2008},
    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 «
9.2 0 9.1 0 9.1 0 9.1 0 9.1 0 9.2 0 9.3 0 9.3 0 9.3 0 9.3 0 9.3 0 9.4 0 9.4 0 9.4 0 9.5 0 9.5 0 9.4 0 9.4 0 9.3 0 9.4 0 9.4 0 9.2 0 9.1 0 9.1 0 9.1 0 9.1 0 9 0 8.9 0 8.8 0 8.7 0 8.5 0 8.3 0 8.1 0 7.8 0 7.6 0 7.5 0 7.4 0 7.3 0 7.1 0 6.9 0 6.8 0 6.8 0 6.8 0 6.9 0 6.7 0 6.6 0 6.5 0 6.4 0 6.3 0 6.3 0 6.3 0 6.5 0 6.6 0 6.5 0 6.4 0 6.5 0 6.7 0 7.1 0 7.1 0 7.2 1 7.2 1 7.3 1 7.3 1 7.3 1 7.4 1 7.4 1 7.6 1 7.6 1 7.6 1 7.7 1 7.8 1 7.9 1 8.1 1 8.1 1 8.1 1 8.2 1 8.2 1 8.2 1 8.2 1 8.2 1 8.2 1 8.3 1 8.3 1 8.4 1 8.4 1 8.4 1 8.3 1 8 1 8 1 8.2 1 8.6 1 8.7 1 8.7 1 8.5 1 8.4 1 8.4 1 8.4 1 8.5 1 8.5 1 8.5 1 8.5 1 8.5 1 8.4 1 8.4 1 8.4 1 8.5 1 8.5 1 8.6 1 8.6 1 8.6 1 8.5 1 8.4 1 8.4 1 8.3 1 8.2 1 8.1 1 8.2 1 8.1 1 8 1 7.9 1 7.8 1 7.7 1 7.7 1 7.9 1 7.8 1 7.6 1 7.4 1 7.3 1 7.1 1 7.1 1 7 1 7 1
 
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 time5 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
Werkloosheid[t] = + 8.68377224021514 + 1.36999725249565SabenaFailliet[t] + 0.0750171372114794M1[t] + 0.0877841516178363M2[t] + 0.0732784387514679M3[t] + 0.0769545440669175M4[t] + 0.0806306493823677M5[t] + 0.0843067546978174M6[t] + 0.097073769104176M7[t] + 0.118931692601443M8[t] + 0.113516888825983M9[t] + 0.117192994141433M10[t] + 0.0845054630932464M11[t] -0.0218579234972678t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)8.683772240215140.28386630.591100
SabenaFailliet1.369997252495650.2825944.84794e-062e-06
M10.07501713721147940.34730.2160.829360.41468
M20.08778415161783630.3471230.25290.8007930.400396
M30.07327843875146790.3469850.21120.8331060.416553
M40.07695454406691750.3468870.22180.8248190.41241
M50.08063064938236770.3468270.23250.8165680.408284
M60.08430675469781740.3468080.24310.8083550.404177
M70.0970737691041760.3468270.27990.7800510.390026
M80.1189316926014430.3468870.34290.7323180.366159
M90.1135168888259830.3469850.32720.7441330.372066
M100.1171929941414330.3471230.33760.7362550.368128
M110.08450546309324640.34730.24330.8081790.40409
t-0.02185792349726780.003698-5.911100


Multiple Linear Regression - Regression Statistics
Multiple R0.483454213925128
R-squared0.233727976961964
Adjusted R-squared0.149308177813706
F-TEST (value)2.76863933958775
F-TEST (DF numerator)13
F-TEST (DF denominator)118
p-value0.00180659680458561
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.812768904179986
Sum Squared Residuals77.9500084090285


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
19.28.736931453929340.463068546070665
29.18.727840544838440.372159455161559
39.18.69147690847480.408523091525197
49.18.673295090292980.426704909707017
59.18.655113272111160.444886727888835
69.28.636931453929350.563068546070651
79.38.627840544838440.672159455161561
89.38.627840544838440.67215945516156
99.38.600567817565710.699432182434289
109.38.58238599938390.717614000616107
119.38.527840544838440.772159455161562
129.48.421477158247920.978522841752075
139.48.474636371962140.925363628037864
149.48.465545462871230.934454537128773
159.58.429181826507591.07081817349241
169.58.411000008325771.08899999167423
179.48.392818190143951.00718180985605
189.48.374636371962131.02536362803787
199.38.365545462871230.934454537128775
209.48.365545462871221.03445453712877
219.48.33827273559851.06172726440150
229.28.320090917416680.879909082583319
239.18.265545462871230.834454537128774
249.18.159182076280710.940817923719288
259.18.212341289994920.887658710005077
269.18.203250380904010.896749619095987
2798.166886744540380.833113255459623
288.98.148704926358560.751295073641442
298.88.130523108176740.669476891823261
308.78.112341289994920.587658710005078
318.58.103250380904010.396749619095987
328.38.103250380904010.196749619095988
338.18.075977653631280.0240223463687147
347.88.05779583544947-0.257795835449467
357.68.00325038090401-0.403250380904012
367.57.8968869943135-0.396886994313498
377.47.95004620802771-0.55004620802771
387.37.9409552989368-0.640955298936799
397.17.90459166257316-0.804591662573163
406.97.88640984439134-0.986409844391344
416.87.86822802620953-1.06822802620953
426.87.85004620802771-1.05004620802771
436.87.8409552989368-1.0409552989368
446.97.8409552989368-0.940955298936799
456.77.81368257166407-1.11368257166407
466.67.79550075348225-1.19550075348225
476.57.7409552989368-1.2409552989368
486.47.63459191234628-1.23459191234628
496.37.6877511260605-1.38775112606050
506.37.67866021696959-1.37866021696959
516.37.64229658060595-1.34229658060595
526.57.62411476242413-1.12411476242413
536.67.60593294424231-1.00593294424231
546.57.5877511260605-1.08775112606049
556.47.57866021696959-1.17866021696959
566.57.57866021696959-1.07866021696959
576.77.55138748969686-0.851387489696859
587.17.53320567151504-0.433205671515041
597.17.47866021696959-0.378660216969587
607.28.74229408287472-1.54229408287472
617.28.79545329658893-1.59545329658893
627.38.78636238749802-1.48636238749802
637.38.74999875113439-1.44999875113439
647.38.73181693295257-1.43181693295257
657.48.71363511477075-1.31363511477075
667.48.69545329658893-1.29545329658893
677.68.68636238749802-1.08636238749802
687.68.68636238749802-1.08636238749802
697.68.6590896602253-1.05908966022530
707.78.64090784204348-0.940907842043477
717.88.58636238749802-0.786362387498023
727.98.47999900090751-0.579999000907508
738.18.53315821462172-0.433158214621721
748.18.52406730553081-0.42406730553081
758.18.48770366916717-0.387703669167174
768.28.46952185098536-0.269521850985356
778.28.45134003280354-0.251340032803538
788.28.43315821462172-0.233158214621719
798.28.42406730553081-0.224067305530811
808.28.42406730553081-0.224067305530810
818.28.39679457825808-0.196794578258083
828.38.37861276007626-0.0786127600762636
838.38.32406730553081-0.0240673055308089
848.48.21770391894030.182296081059705
858.48.27086313265450.129136867345493
868.48.26177222356360.138227776436404
878.38.225408587199960.0745914128000404
8888.20722676901814-0.207226769018142
8988.18904495083632-0.189044950836324
908.28.17086313265450.0291368673454937
918.68.16177222356360.438227776436403
928.78.16177222356360.538227776436403
938.78.134499496290870.56550050370913
948.58.116317678109050.383682321890949
958.48.06177222356360.338227776436404
968.47.955408836973080.444591163026918
978.48.00856805068730.391431949312707
988.57.999477141596380.500522858403617
998.57.963113505232750.536886494767253
1008.57.944931687050930.555068312949072
1018.57.926749868869110.573250131130889
1028.57.90856805068730.591431949312708
1038.47.899477141596380.500522858403617
1048.47.899477141596380.500522858403617
1058.47.872204414323660.527795585676345
1068.57.854022596141840.645977403858162
1078.57.799477141596380.700522858403617
1088.67.693113755005870.906886244994131
1098.67.746272968720080.85372703127992
1108.67.737182059629170.86281794037083
1118.57.700818423265530.799181576734466
1128.47.682636605083720.717363394916285
1138.47.66445478690190.735545213098103
1148.37.646272968720080.653727031279922
1158.27.637182059629170.562817940370829
1168.17.637182059629170.46281794037083
1178.27.609909332356440.590090667643557
1188.17.591727514174620.508272485825375
11987.537182059629170.46281794037083
1207.97.430818673038660.469181326961345
1217.87.483977886752870.316022113247133
1227.77.474886977661960.225113022338044
1237.77.438523341298320.261476658701680
1247.97.42034152311650.479658476883498
1257.87.402159704934680.397840295065316
1267.67.383977886752870.216022113247134
1277.47.374886977661960.0251130223380437
1287.37.37488697766196-0.0748869776619568
1297.17.34761425038923-0.247614250389229
1307.17.32943243220741-0.229432432207412
13177.27488697766196-0.274886977661956
13277.16852359107144-0.168523591071442


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.0009293832227688340.001858766445537670.999070616777231
180.0001443965327124870.0002887930654249730.999855603467288
190.0001763423469515460.0003526846939030920.999823657653048
204.15012416785942e-058.30024833571885e-050.999958498758321
219.52719451686855e-061.90543890337371e-050.999990472805483
229.49598524398028e-061.89919704879606e-050.999990504014756
231.29781805034790e-052.59563610069580e-050.999987021819497
242.29021954287029e-054.58043908574058e-050.99997709780457
252.48785405222571e-054.97570810445142e-050.999975121459478
261.63542912418428e-053.27085824836857e-050.999983645708758
271.98481611788618e-053.96963223577236e-050.999980151838821
283.27391120448243e-056.54782240896487e-050.999967260887955
295.49612462392825e-050.0001099224924785650.99994503875376
300.0001586921384185780.0003173842768371550.999841307861581
310.0007685444632268490.001537088926453700.999231455536773
320.005450678679698660.01090135735939730.994549321320301
330.03059267494245560.06118534988491130.969407325057544
340.1118045552684950.2236091105369900.888195444731505
350.2674051864275590.5348103728551180.732594813572441
360.4888315333702370.9776630667404730.511168466629763
370.6238691949487350.752261610102530.376130805051265
380.71757502309770.56484995380460.2824249769023
390.8035517312263010.3928965375473980.196448268773699
400.8687634733914740.2624730532170510.131236526608526
410.904313906979440.1913721860411190.0956860930205597
420.9234176327289160.1531647345421690.0765823672710844
430.92975543380120.1404891323976020.070244566198801
440.927250871662160.1454982566756790.0727491283378397
450.9262987405429540.1474025189140920.0737012594570462
460.9191854338083270.1616291323833470.0808145661916734
470.9099308890037240.1801382219925520.090069110996276
480.9028473116580220.1943053766839560.097152688341978
490.8884789151169840.2230421697660320.111521084883016
500.8707951277141130.2584097445717750.129204872285887
510.8490235786221030.3019528427557940.150976421377897
520.8147219365685220.3705561268629560.185278063431478
530.7765068456219160.4469863087561680.223493154378084
540.7350481173215770.5299037653568470.264951882678423
550.6988051281026030.6023897437947950.301194871897397
560.6611573082098670.6776853835802650.338842691790133
570.6295518741906120.7408962516187760.370448125809388
580.6462092800194440.7075814399611120.353790719980556
590.6677560700657430.6644878598685140.332243929934257
600.66380416335260.6723916732948010.336195836647400
610.6990434877708620.6019130244582750.300956512229137
620.7299537663387610.5400924673224770.270046233661239
630.7630946924421610.4738106151156780.236905307557839
640.8012611520717840.3974776958564320.198738847928216
650.832103968528890.335792062942220.16789603147111
660.8656754525946160.2686490948107690.134324547405384
670.8871648915730770.2256702168538460.112835108426923
680.9076033297786430.1847933404427140.092396670221357
690.9288681504886490.1422636990227020.0711318495113508
700.9446496853114840.1107006293770310.0553503146885157
710.95491154990750.09017690018500150.0450884500925008
720.9705633270142590.05887334597148240.0294366729857412
730.9855022046269720.02899559074605640.0144977953730282
740.9927766901028580.01444661979428470.00722330989714236
750.996206253428120.007587493143758650.00379374657187933
760.9977357104812870.004528579037425750.00226428951871287
770.9985533567024550.002893286595089080.00144664329754454
780.999022507035170.001954985929661210.000977492964830606
790.9993380544338660.001323891132267470.000661945566133733
800.9995282359753960.0009435280492071160.000471764024603558
810.9996646489277870.000670702144425120.00033535107221256
820.9997200554882270.0005598890235462080.000279944511773104
830.9997448555396460.0005102889207087290.000255144460354365
840.9998093489889750.0003813020220507210.000190651011025361
850.999881156873620.0002376862527605130.000118843126380256
860.9999228727581440.0001542544837127367.71272418563682e-05
870.999954022667629.19546647588039e-054.59773323794019e-05
880.9999919829796631.60340406732937e-058.01702033664686e-06
890.9999993546363621.29072727553609e-066.45363637768043e-07
900.9999998876867382.24626523706998e-071.12313261853499e-07
910.9999998768302562.46339487195875e-071.23169743597938e-07
920.9999998181147733.63770453373547e-071.81885226686773e-07
930.9999997069324545.86135091981574e-072.93067545990787e-07
940.9999996125149347.74970132135664e-073.87485066067832e-07
950.9999995511997828.97600435201076e-074.48800217600538e-07
960.9999995985373868.02925228624052e-074.01462614312026e-07
970.9999997975823364.04835327098842e-072.02417663549421e-07
980.9999998370765073.25846986760418e-071.62923493380209e-07
990.9999998596893632.80621273975789e-071.40310636987894e-07
1000.999999931854521.36290961043365e-076.81454805216823e-08
1010.9999999729671885.40656230735254e-082.70328115367627e-08
1020.9999999806508843.86982321398433e-081.93491160699217e-08
1030.9999999874729482.50541036606712e-081.25270518303356e-08
1040.9999999893007562.13984877601580e-081.06992438800790e-08
1050.9999999929249541.41500928948329e-087.07504644741646e-09
1060.9999999886355972.27288065475384e-081.13644032737692e-08
1070.9999999692179846.15640325956914e-083.07820162978457e-08
1080.9999998332532733.33493453482908e-071.66746726741454e-07
1090.9999989827021162.03459576873470e-061.01729788436735e-06
1100.999994280731361.14385372797371e-055.71926863986855e-06
1110.9999661503007016.76993985975945e-053.38496992987972e-05
1120.9999500635262159.9872947570992e-054.9936473785496e-05
1130.999902057343740.0001958853125201579.79426562600786e-05
1140.999698137135210.0006037257295791550.000301862864789578
1150.9982720292490630.003455941501874650.00172797075093732


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level560.565656565656566NOK
5% type I error level590.595959595959596NOK
10% type I error level620.626262626262626NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229950740eo31tpzq64x43nr/10r5hy1229950569.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229950740eo31tpzq64x43nr/10r5hy1229950569.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229950740eo31tpzq64x43nr/155pm1229950569.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229950740eo31tpzq64x43nr/155pm1229950569.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229950740eo31tpzq64x43nr/2x7o71229950569.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229950740eo31tpzq64x43nr/2x7o71229950569.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229950740eo31tpzq64x43nr/3unkq1229950569.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229950740eo31tpzq64x43nr/3unkq1229950569.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229950740eo31tpzq64x43nr/43gqw1229950569.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229950740eo31tpzq64x43nr/43gqw1229950569.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229950740eo31tpzq64x43nr/5cm7n1229950569.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229950740eo31tpzq64x43nr/5cm7n1229950569.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229950740eo31tpzq64x43nr/6odtf1229950569.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229950740eo31tpzq64x43nr/6odtf1229950569.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229950740eo31tpzq64x43nr/7tah11229950569.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229950740eo31tpzq64x43nr/7tah11229950569.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229950740eo31tpzq64x43nr/8gvh91229950569.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229950740eo31tpzq64x43nr/8gvh91229950569.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229950740eo31tpzq64x43nr/9gs5o1229950569.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Dec/22/t1229950740eo31tpzq64x43nr/9gs5o1229950569.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