Home » date » 2010 » Dec » 06 »

*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: Mon, 06 Dec 2010 16:31:24 +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/06/t1291653162ppnyrhtj7xcrns2.htm/, Retrieved Mon, 06 Dec 2010 17:32:52 +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/06/t1291653162ppnyrhtj7xcrns2.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 «
3484,74 13830,14 9349,44 7977 -5,6 6 1 3,17 3411,13 14153,22 9327,78 8241 -6,2 3 1 3,17 3288,18 15418,03 9753,63 8444 -7,1 2 1,2 3,36 3280,37 16666,97 10443,5 8490 -1,4 2 1,2 3,11 3173,95 16505,21 10853,87 8388 -0,1 2 0,8 3,11 3165,26 17135,96 10704,02 8099 -0,9 -8 0,7 3,57 3092,71 18033,25 11052,23 7984 0 0 0,7 4,04 3053,05 17671 10935,47 7786 0,1 -2 0,9 4,21 3181,96 17544,22 10714,03 8086 2,6 3 1,2 4,36 2999,93 17677,9 10394,48 9315 6 5 1,3 4,75 3249,57 18470,97 10817,9 9113 6,4 8 1,5 4,43 3210,52 18409,96 11251,2 9023 8,6 8 1,9 4,7 3030,29 18941,6 11281,26 9026 6,4 9 1,8 4,81 2803,47 19685,53 10539,68 9787 7,7 11 1,9 5,01 2767,63 19834,71 10483,39 9536 9,2 13 2,2 5 2882,6 19598,93 10947,43 9490 8,6 12 2,1 4,81 2863,36 17039,97 10580,27 9736 7,4 13 2,2 5,11 2897,06 16969,28 10582,92 9694 8,6 15 2,7 5,1 3012,61 16973,38 10654,41 9647 6,2 13 2,8 5,11 3142,95 16329,89 11014,51 9753 6 16 2,9 5,21 3032,93 16153,34 10967,87 10070 6,6 10 3,4 5,21 3045,78 15311,7 10433,56 10137 5,1 14 3 5,21 3 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time9 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
BEL_20[t] = -1471.55250880347 + 0.0954355312113703Nikkei[t] + 0.369163039198861DJ_Indust[t] + 0.0238744986798515Goudprijs[t] -10.6388338055077Conjunct_Seizoenzuiver[t] + 13.4082779421853Cons_vertrouw[t] + 36.2029927235425Alg_consumptie_index_BE[t] -278.729546599587Gem_rente_kasbon_5j[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-1471.55250880347334.820996-4.3952.4e-051.2e-05
Nikkei0.09543553121137030.014896.409400
DJ_Indust0.3691630391988610.03449810.700900
Goudprijs0.02387449867985150.0082272.90190.0043910.002195
Conjunct_Seizoenzuiver-10.63883380550776.686008-1.59120.1141090.057054
Cons_vertrouw13.40827794218536.245422.14690.0337480.016874
Alg_consumptie_index_BE36.202992723542522.7973871.5880.1148260.057413
Gem_rente_kasbon_5j-278.72954659958750.979851-5.467400


Multiple Linear Regression - Regression Statistics
Multiple R0.941641426248589
R-squared0.886688575627476
Adjusted R-squared0.880291962961286
F-TEST (value)138.618456658170
F-TEST (DF numerator)7
F-TEST (DF denominator)124
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation260.514793987770
Sum Squared Residuals8415626.77792477


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
13484.742782.9062769675701.8337230325
23411.132778.20485107048632.925148929522
33288.183011.41592595034276.764074049664
43280.373395.42294505136-115.052945051356
53173.953500.73185001672-326.781850016719
63165.263241.30139670025-76.0413967002547
73092.713419.42382524288-326.713825242876
83053.053268.99781322394-215.947813223945
93181.963191.80915380501-9.84915380500932
102999.933001.50298236305-1.57298236304665
113249.573361.08175818603-111.511758186028
123210.523428.88766156591-218.367661565914
133030.293493.32683474948-463.036834749478
142803.473269.58921825948-466.119218259476
152767.633281.56010261961-513.930102619609
162882.63471.57983976385-588.979839763845
172863.363043.87167181946-180.511671819459
182897.063072.03963437298-174.979634372979
193012.613097.24993334053-84.6399333405251
203142.953189.40437583695-46.4543758369476
213032.933094.17421316021-61.2442131602135
223045.782873.31410599627172.465894003733
233110.522952.50485978835158.015140211654
243013.243039.72840480046-26.4884048004578
252987.12996.52224692528-9.42224692528093
262995.552943.9145444997551.6354555002539
272833.182666.48140967185166.698590328153
282848.962826.5193982305622.4406017694427
292794.832987.19462930827-192.364629308267
302845.263009.92204066049-164.662040660487
312915.022810.96679487084104.053205129165
322892.632663.17527363360229.454726366404
332604.422106.36423852480498.055761475196
342641.652171.90268293308469.747317066924
352659.812369.79939967285290.010600327151
362638.532451.67492933541186.855070664595
372720.252506.44299736808213.807002631916
382745.882442.06806342782303.81193657218
392735.72702.3818090608833.318190939116
402811.72508.4193965516303.2806034484
412799.432504.98174463288294.448255367116
422555.282233.7353243904321.544675609602
432304.981908.80279944558396.177200554424
442214.951945.60573095747269.344269042525
452065.811781.77926015096284.030739849039
461940.491698.34022526250242.149774737498
4720421877.29997118634164.700028813658
481995.371815.57251427901179.797485720992
491946.811888.8642846509257.9457153490768
501765.91715.1895533338050.7104466662039
511635.251678.39048532208-43.1404853220774
521833.421806.9530527236726.4669472763262
531910.432069.59072607337-159.160726073366
541959.672429.16326929088-469.493269290875
551969.62385.04093186342-415.440931863422
562061.412348.56867776170-287.158677761696
572093.482554.86041680655-461.380416806548
582120.882419.67942614705-298.799426147051
592174.562504.58264818782-330.022648187820
602196.722630.18922282629-433.46922282629
612350.442839.07854317997-488.638543179968
622440.252845.13567181262-404.885671812615
632408.642820.44757767273-411.807577672728
642472.812950.71515592222-477.905155922219
652407.62683.68606159096-276.086061590964
662454.622901.20733260169-446.587332601692
672448.052679.27996319084-231.229963190844
682497.842678.89964407652-181.059644076521
692645.642739.8367105046-94.196710504604
702756.762626.74520724389130.014792756113
712849.272787.0876911893962.1823088106102
722921.442923.54360488827-2.10360488827106
732981.852913.0850726953268.7649273046758
743080.583114.46573186389-33.8857318638916
753106.223167.1284348135-60.9084348135003
763119.312965.75729212929153.552707870711
773061.262900.64980171626160.610198283741
783097.313026.9973980743570.3126019256458
793161.693118.2665639727843.4234360272214
803257.163155.36489682314101.795103176863
813277.013151.04445248029125.965547519714
823295.323161.33003187036133.989968129645
833363.993342.8035226973921.1864773026068
843494.173551.49276747278-57.3227674727801
853667.033644.7964575255622.2335424744379
863813.063691.5772318172121.482768182800
873917.963667.16351586527250.796484134733
883895.513745.20465282433150.305347175671
893801.063655.53164839026145.528351609735
903570.123391.76836134461178.351638655387
913701.613385.78426232281315.825737677191
923862.273527.54239550801334.727604491992
933970.13648.06199939585322.038000604154
944138.523894.07420353413244.445796465871
954199.753971.26211885784228.487881142157
964290.893965.84238011712325.047619882884
974443.914138.07831343244305.831686567559
984502.644204.27990036321298.360099636787
994356.983986.66242748394370.317572516063
1004591.274229.92187701452361.348122985484
1014696.964459.37535235478237.58464764522
1024621.44394.54378002604226.856219973956
1034562.844400.90134647826161.938653521738
1044202.524114.3559735057788.164026494235
1054296.494262.6378648205233.8521351794845
1064435.234526.11710050783-90.8871005078348
1074105.184114.62359388622-9.4435938862209
1084116.684287.37207046046-170.692070460459
1093844.493777.5559082441566.9340917558457
1103720.983824.85307235633-103.873072356332
1113674.43768.15519271046-93.7551927104564
1123857.623977.54863426004-119.928634260039
1133801.064003.90475196433-202.844751964330
1143504.373598.54192114657-94.1719211465738
1153032.63125.94758607654-93.3475860765388
1163047.033168.46584407277-121.435844072772
1172962.343127.76341408423-165.423414084230
1182197.822084.53038087081113.289619129190
1192014.451877.3927155733137.057284426701
1201862.831914.68332931617-51.85332931617
1211905.411936.5534971336-31.1434971335989
1221810.991720.4917229298390.4982770701676
1231670.071592.6358385098577.434161490152
1241864.441933.83156176222-69.3915617622216
1252052.022105.87220617235-53.8522061723506
1262029.62151.18336073787-121.583360737874
1272070.832134.4529743431-63.6229743431011
1282293.412533.19956917905-239.78956917905
1292443.272609.58390893535-166.313908935353
1302513.172634.04289735311-120.872897353108
1312466.922824.88267013467-357.962670134671
1322502.662904.13932919437-401.479329194367


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
110.03239979735292950.06479959470585910.96760020264707
120.01528632640207160.03057265280414320.984713673597928
130.00579310282952340.01158620565904680.994206897170477
140.01492370535223760.02984741070447520.985076294647762
150.01830477285462250.0366095457092450.981695227145377
160.01429978006082650.02859956012165310.985700219939173
170.04451914503430030.08903829006860070.9554808549657
180.03957291035603550.0791458207120710.960427089643965
190.02934336785969130.05868673571938270.970656632140309
200.02433082052820030.04866164105640050.9756691794718
210.01743158226097190.03486316452194380.982568417739028
220.01005809813883150.02011619627766300.989941901861169
230.005554520861070980.01110904172214200.994445479138929
240.00858846718210040.01717693436420080.9914115328179
250.01757022658087830.03514045316175660.982429773419122
260.01908671122566860.03817342245133720.980913288774331
270.0409838550882410.0819677101764820.959016144911759
280.07386563813118210.1477312762623640.926134361868818
290.08528145127334870.1705629025466970.914718548726651
300.07959566156490180.1591913231298040.920404338435098
310.06183329319974190.1236665863994840.938166706800258
320.04328634076454550.0865726815290910.956713659235454
330.04688448974456340.09376897948912680.953115510255437
340.03991774693976420.07983549387952850.960082253060236
350.03340561950805510.06681123901611020.966594380491945
360.02445935970613340.04891871941226680.975540640293867
370.01851200840085860.03702401680171720.981487991599141
380.01913438577469290.03826877154938580.980865614225307
390.01381702083472160.02763404166944320.986182979165278
400.01570390674899410.03140781349798820.984296093251006
410.01172299774890050.02344599549780090.9882770022511
420.01279734039758770.02559468079517540.987202659602412
430.04623888177520090.09247776355040180.953761118224799
440.1119048180286570.2238096360573140.888095181971343
450.1794353675148180.3588707350296360.820564632485182
460.2980145183388530.5960290366777060.701985481661147
470.400206048975690.800412097951380.59979395102431
480.4346506964551880.8693013929103770.565349303544812
490.4509833145697620.9019666291395250.549016685430238
500.4148734210834870.8297468421669740.585126578916513
510.427696112371620.855392224743240.57230388762838
520.6603971332231790.6792057335536420.339602866776821
530.7705069916152730.4589860167694530.229493008384727
540.8832014378009720.2335971243980560.116798562199028
550.9153912162701250.1692175674597510.0846087837298755
560.9028797986302270.1942404027395450.0971202013697726
570.9146238134322670.1707523731354670.0853761865677333
580.927248530376460.1455029392470790.0727514696235395
590.9185825606891410.1628348786217180.081417439310859
600.920074721874450.1598505562510980.0799252781255492
610.9346848670811140.1306302658377720.0653151329188861
620.9317474338234180.1365051323531650.0682525661765824
630.9546966912519930.09060661749601320.0453033087480066
640.991810970937030.01637805812594050.00818902906297025
650.9959752901862680.00804941962746350.00402470981373175
660.9992853334667160.001429333066568570.000714666533284283
670.999818912438320.0003621751233608320.000181087561680416
680.9999326439173290.0001347121653418026.73560826709012e-05
690.9999750228827834.99542344347484e-052.49771172173742e-05
700.9999920983651331.58032697344862e-057.90163486724312e-06
710.9999959926290068.0147419883021e-064.00737099415105e-06
720.9999967718518186.45629636470691e-063.22814818235346e-06
730.9999973914476915.21710461742972e-062.60855230871486e-06
740.9999978093150344.38136993116523e-062.19068496558262e-06
750.9999984185720123.16285597597775e-061.58142798798887e-06
760.9999986613751822.67724963630439e-061.33862481815219e-06
770.9999988956760512.20864789754283e-061.10432394877142e-06
780.9999989765124052.04697519069756e-061.02348759534878e-06
790.9999987024435742.59511285117537e-061.29755642558768e-06
800.999998494707193.01058562045257e-061.50529281022628e-06
810.9999985475632512.90487349773240e-061.45243674886620e-06
820.9999985167722412.96645551698758e-061.48322775849379e-06
830.9999983205800463.3588399073991e-061.67941995369955e-06
840.9999995519759668.96048068353057e-074.48024034176528e-07
850.9999998767119672.46576065540835e-071.23288032770418e-07
860.9999999340084671.31983066215823e-076.59915331079114e-08
870.9999999241197621.51760475101662e-077.58802375508312e-08
880.999999968408336.31833410290195e-083.15916705145098e-08
890.9999999737255545.25488928073461e-082.62744464036730e-08
900.9999999838185383.23629239456539e-081.61814619728270e-08
910.99999996705286.58943995559013e-083.29471997779507e-08
920.9999999324741771.35051645973568e-076.75258229867841e-08
930.9999998739537662.52092468638194e-071.26046234319097e-07
940.9999998918156462.16368708985461e-071.08184354492731e-07
950.999999837881893.24236222101166e-071.62118111050583e-07
960.9999996951806366.09638726899165e-073.04819363449582e-07
970.9999994608164661.07836706715209e-065.39183533576043e-07
980.9999986325351372.73492972584283e-061.36746486292141e-06
990.9999966146331946.77073361146977e-063.38536680573488e-06
1000.999993308852591.33822948188023e-056.69114740940116e-06
1010.999986651950612.66960987830777e-051.33480493915389e-05
1020.9999751802028264.96395943488386e-052.48197971744193e-05
1030.9999581999615698.36000768627274e-054.18000384313637e-05
1040.9999155987991050.0001688024017903878.44012008951936e-05
1050.9998766726475040.0002466547049919230.000123327352495962
1060.9997953782771640.0004092434456717170.000204621722835859
1070.999784380685140.0004312386297201750.000215619314860088
1080.9996097416494990.0007805167010027930.000390258350501396
1090.9999705175529145.89648941717101e-052.94824470858551e-05
1100.9999759055708354.81888583306757e-052.40944291653379e-05
1110.99995168395029.66320995995522e-054.83160497997761e-05
1120.9999481560730690.0001036878538627165.18439269313579e-05
1130.9999247558638480.0001504882723031587.52441361515789e-05
1140.999984790068173.04198636579714e-051.52099318289857e-05
1150.9999364336334280.0001271327331446186.35663665723088e-05
1160.9997435982929430.0005128034141134660.000256401707056733
1170.9994831645039850.001033670992030540.000516835496015269
1180.9979720447804350.004055910439130220.00202795521956511
1190.9994855883136630.001028823372674640.000514411686337322
1200.9972920380615220.00541592387695590.00270796193847795
1210.9863266974486950.0273466051026090.0136733025513045


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level560.504504504504504NOK
5% type I error level770.693693693693694NOK
10% type I error level880.792792792792793NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653162ppnyrhtj7xcrns2/10ziq11291653073.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653162ppnyrhtj7xcrns2/10ziq11291653073.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653162ppnyrhtj7xcrns2/1szs71291653073.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653162ppnyrhtj7xcrns2/1szs71291653073.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653162ppnyrhtj7xcrns2/2lras1291653073.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653162ppnyrhtj7xcrns2/2lras1291653073.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653162ppnyrhtj7xcrns2/3lras1291653073.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653162ppnyrhtj7xcrns2/3lras1291653073.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653162ppnyrhtj7xcrns2/4lras1291653073.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653162ppnyrhtj7xcrns2/4lras1291653073.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653162ppnyrhtj7xcrns2/5e09d1291653073.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653162ppnyrhtj7xcrns2/5e09d1291653073.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653162ppnyrhtj7xcrns2/6e09d1291653073.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653162ppnyrhtj7xcrns2/6e09d1291653073.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653162ppnyrhtj7xcrns2/7798y1291653073.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653162ppnyrhtj7xcrns2/7798y1291653073.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653162ppnyrhtj7xcrns2/8798y1291653073.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653162ppnyrhtj7xcrns2/8798y1291653073.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653162ppnyrhtj7xcrns2/9ziq11291653073.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653162ppnyrhtj7xcrns2/9ziq11291653073.ps (open in new window)


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by