Home » date » 2010 » Dec » 05 »

*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: Sun, 05 Dec 2010 21:39:06 +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/05/t12915850991ebz0in7ewg9hgv.htm/, Retrieved Sun, 05 Dec 2010 22:38:21 +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/05/t12915850991ebz0in7ewg9hgv.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 «
2293,41 10430,35 9374,63 -18,2 -11 3,3 -0,8 2443,27 2513,17 2466,92 2502,66 2070,83 9691,12 8679,75 -22,8 -17 3,47 -1,7 2293,41 2443,27 2513,17 2466,92 2029,6 9810,31 8593 -23,6 -18 3,72 -1,1 2070,83 2293,41 2443,27 2513,17 2052,02 9304,43 8398,37 -27,6 -19 3,67 -0,4 2029,6 2070,83 2293,41 2443,27 1864,44 8767,96 7992,12 -29,4 -22 3,82 0,6 2052,02 2029,6 2070,83 2293,41 1670,07 7764,58 7235,47 -31,8 -24 3,85 0,6 1864,44 2052,02 2029,6 2070,83 1810,99 7694,78 7690,5 -31,4 -24 3,9 1,9 1670,07 1864,44 2052,02 2029,6 1905,41 8331,49 8396,2 -27,6 -20 3,99 2,3 1810,99 1670,07 1864,44 2052,02 1862,83 8460,94 8595,56 -28,8 -25 4,35 2,6 1905,41 1810,99 1670,07 1864,44 2014,45 8531,45 8614,55 -21,9 -22 4,98 3,1 1862,83 1905,41 1810,99 1670,07 2197,82 9117,03 9181,73 -13,9 -17 5,46 4,7 2014,45 1862,83 1905,41 1810,99 2962,34 12123,53 11114,08 -8 -9 5,19 5,5 2197,82 2014,45 1862,83 1905,41 3047,03 12989,35 11530,75 -2,8 -11 5,03 5,4 2962,34 2197,82 2014,45 1862,83 3032,6 13168,91 11322,38 -3,3 -13 5,38 5,9 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 time10 seconds
R Server'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
BEL_20[t] = -546.230265905034 + 0.00497848663458504Nikkei[t] + 0.064130924727598DJ_Indust[t] -2.4442084265653Conjunct_Seizoenzuiver[t] -0.956816977273839Cons_vertrouw[t] + 37.9019963078767Rend_oblig_EUR[t] + 11.9162996323731Alg_consumptie_index_BE[t] + 1.0619313863985Y1[t] -0.292689132011974Y2[t] + 0.13605984089728Y3[t] -0.0183487610508147Y4[t] -51.4908803453574M1[t] -56.7853158988978M2[t] -58.0309927479335M3[t] -37.7722465200661M4[t] -68.7764884632851M5[t] -120.354286713861M6[t] -2.68155983648654M7[t] -59.9732492342926M8[t] -85.7452911011672M9[t] -67.6665101098873M10[t] -76.3701833397756M11[t] + 0.22183130685296t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-546.230265905034194.981219-2.80150.0057450.002872
Nikkei0.004978486634585040.004721.05490.2931510.146575
DJ_Indust0.0641309247275980.0142334.50561.3e-057e-06
Conjunct_Seizoenzuiver-2.44420842656532.172125-1.12530.262240.13112
Cons_vertrouw-0.9568169772738392.022311-0.47310.6367940.318397
Rend_oblig_EUR37.901996307876715.5057852.44440.0156460.007823
Alg_consumptie_index_BE11.916299632373110.6227031.12180.2637150.131857
Y11.06193138639850.08111513.091600
Y2-0.2926891320119740.117551-2.48990.0138480.006924
Y30.136059840897280.1170081.16280.246710.123355
Y4-0.01834876105081470.077425-0.2370.8129840.406492
M1-51.490880345357444.407475-1.15950.2480550.124027
M2-56.785315898897844.374047-1.27970.2025890.101294
M3-58.030992747933544.473916-1.30480.1939090.096955
M4-37.772246520066144.263057-0.85340.3947950.197397
M5-68.776488463285144.332146-1.55140.1228740.061437
M6-120.35428671386144.281582-2.71790.0073270.003664
M7-2.6815598364865444.350327-0.06050.9518660.475933
M8-59.973249234292644.730392-1.34080.1819820.090991
M9-85.745291101167245.283421-1.89350.0601760.030088
M10-67.666510109887345.069847-1.50140.1353210.06766
M11-76.370183339775644.836184-1.70330.0905390.04527
t0.221831306852960.4605990.48160.6307680.315384


Multiple Linear Regression - Regression Statistics
Multiple R0.991017486025751
R-squared0.9821156576088
Adjusted R-squared0.979544052820524
F-TEST (value)381.907695181581
F-TEST (DF numerator)22
F-TEST (DF denominator)153
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation118.049470789014
Sum Squared Residuals2132158.66569565


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
12293.412374.9204471504-81.5104471504024
22070.832202.57371470657-131.743714706575
32029.62013.2558521025916.3441478974135
42052.022038.1720381322713.8479618677283
51864.442011.87887631872-147.438876318724
61670.071708.63486552215-38.5648655221507
71810.991724.0740308445186.9159691554925
81905.411891.0975315317214.3124684682847
91862.831939.93138912236-77.1013891223556
102014.451919.7890543759794.6609456240305
112197.822147.2513807011550.5686192988492
122962.342482.78165706429479.558342935708
133047.033224.10037520864-177.070375208638
143032.63117.25386171145-84.6538617114457
153504.373220.051107333284.318892667005
163801.063758.8498499916642.2101500083401
173857.623873.95620071193-16.3362007119252
183674.43804.49764065487-130.097640654871
193720.983752.22292525193-31.2429252519323
203844.493816.6454273165527.8445726834464
214116.683954.91391412283161.766085877175
224105.184209.35864198702-104.178641987023
234435.234163.75328139702271.476718602975
244296.494589.22157073622-292.73157073622
254202.524263.82694919623-61.3069491962283
264562.844283.33681543981279.503184560186
274621.44648.60804914092-27.2080491409183
284696.964602.3278811383294.6321188616842
294591.274646.24544698546-54.9754469854603
304356.984428.72085025161-71.7408502516143
314502.644363.09234730264139.547652697363
324443.914500.42739811638-56.517398116376
334290.894324.30978991275-33.4197899127477
344199.754195.819780628593.93021937141131
354138.524106.572511248631.9474887513999
363970.14099.96964712113-129.869647121127
373862.273864.70524671014-2.43524671013965
383701.613771.67611451071-70.0661145107054
393570.123611.25520684942-41.135206849423
403801.063562.79875125954238.261248740461
413895.513787.19839548962108.311604510381
423917.963736.48258497383181.477415026173
433813.063872.42338578189-59.3633857818872
443667.033698.1397454553-31.1097454553004
453494.173551.6690102607-57.4990102607003
463363.993403.16267708351-39.1726770835065
473295.323250.1279755328545.1920244671476
483277.013293.02375837092-16.0137583709221
493257.163234.8121603025322.347839697471
503161.693205.35087759409-43.66087759409
513097.313096.960917142950.349082857051021
523061.263069.31577633949-8.05577633949236
533119.313003.58924867598115.720751324023
543106.223046.747242056359.4727579436985
553080.583120.75263737136-40.1726373713582
562981.853031.17338196733-49.3233819673311
572921.442917.712344935183.72765506482012
582849.272886.9687823469-37.6987823469014
592756.762783.8214812394-27.0614812393987
602645.642778.30985333788-132.66985333788
612497.842616.86660354774-119.026603547745
622448.052491.23828209012-43.1882820901185
632454.622489.38285036294-34.7628503629438
642407.62498.38874798934-90.7887479893355
652472.812423.9651588405448.8448411594604
662408.642435.52616212029-26.8861621202918
672440.252480.68220209258-40.4322020925778
682350.442488.08293811056-137.642938110562
692196.722330.03621112739-133.316211127386
702174.562200.91163908127-26.3516390812745
712120.882205.61008319479-84.7300831947874
722093.482193.56220403328-100.08220403328
732061.412126.71982718502-65.3098271850213
741969.62073.85992270252-104.259922702524
751959.671965.72653343761-6.05653343760915
761910.431959.15861293408-48.7286129340816
771833.421873.67116790276-40.2511679027626
781635.251732.83946066238-97.589460662383
791765.91631.87417005499134.025829945005
801946.811801.11047532871145.699524671287
811995.371916.3867259225978.983274077409
8220421959.6700771363682.32992286364
831940.491977.68739397482-37.1973939748218
842065.811942.20142822077123.608571779232
852214.952105.41933306558109.530666934419
862304.982208.8425852375796.1374147624267
872555.282333.83332997212221.446670027884
882799.432663.73254935437135.697450645627
892811.72843.8723466043-32.1723466042971
902735.72798.96105380288-63.2610538028835
912745.882814.46362948746-68.5836294874634
922720.252792.0368219694-71.7868219694018
932638.532730.50374825098-91.9737482509784
942659.812659.572413392450.237586607545997
952641.652663.91840467373-22.2684046737264
962604.422679.41992016769-74.9999201676892
972892.632683.72544724087208.90455275913
982915.023006.14246334576-91.1224633457558
992845.262965.75871842271-120.49871842271
1002794.832940.76805300687-145.938053006872
1012848.962844.093490070774.86650992922868
1022833.182814.613008505118.5669914948993
1032995.552945.7964145537449.7535854462584
1042987.13061.27195663224-74.1719566322435
1053013.242983.7621061641229.4778938358788
1063110.523076.3602994753734.159700524627
1073045.783141.6725783741-95.8925783741013
1083032.933170.03247039503-137.102470395026
1093142.953130.0810337140412.868966285963
1103012.613215.55169409775-202.941694097748
1112897.063024.84982791778-127.789827917784
1122863.362979.2181566094-115.858156609396
1132882.62948.08469363016-65.4846936301613
1142767.632886.90873411199-119.278734111993
1152803.472884.03721998166-80.567219981657
1163030.292943.9823379700186.3076620299932
1173210.523111.3655274105299.1544725894839
1183249.573232.5086530041917.0613469958054
1192999.933222.0270719571-222.097071957098
1203181.963060.31747045725121.642529542751
1213053.053294.27060727036-241.220607270362
1223092.713057.0749792368835.6350207631186
1233165.263132.7617753783132.49822462169
1243173.953181.80721821289-7.85721821289137
1253280.373128.45373017278151.916269827222
1263288.183163.97081792921124.209182070795
1273411.133216.68322204783194.446777952173
1283484.743298.03463367133186.70536632867
1293361.133306.2326247869954.8973752130068
1303230.663194.3333365935536.3266634064473
1313006.843040.56073411741-33.720734117409
1323149.92874.44644042819275.453559571811
1333403.133067.21656677318335.913433226817
1343564.953315.31490667249.635093330002
1353327.73423.80820567826-96.1082056782637
1363141.123198.17848633517-57.0584863351692
1373064.423050.4529185986113.9670814013898
1382880.42913.52888842161-33.1288884216134
1392661.392813.08074213255-151.690742132549
1402504.672532.58673780743-27.9167378074278
1412450.412412.2058394569238.2041605430753
1422354.322384.26533795801-29.945337958006
1432401.332285.24628083222116.083719167783
1442394.362450.68101267712-56.3210126771239
1452409.362383.139382545526.2206174545002
1462525.562412.53394000328113.026059996723
1472346.92514.33703692578-167.437036925776
1482250.272292.69287878474-42.4228787847382
1492152.182185.0165022864-32.8365022864033
1502154.872038.94769763982115.922302360184
1512097.762171.73630691704-73.9763069170388
1521989.312033.50591120422-44.1959112042209
1531877.11907.52772959679-30.4277295967861
1541852.131834.377512098917.752487901105
1551795.651805.45132722119-9.80132722119151
1561751.011812.21086532155-61.2008653215477
1571745.741731.4050717547514.3349282452514
1581703.451729.40753203478-25.9575320347792
1591748.091699.6664509763448.4235490236638
1601734.11778.90514115895-44.8051411589505
1611711.741725.4022030362-13.6622030361979
1621690.61661.4477781064529.1522218935463
1631665.51756.2660243397-90.7660243396975
1641631.591641.95805136251-10.3680513625139
1651538.091580.56303892989-42.4730389298938
1661452.461501.5717948379-49.111794837901
1671429.121411.6194955356217.500504464379
1681471.161470.431701668690.728298331314978
1691475.571457.8109483350217.7590516649845
1701464.651440.9923106187123.6576893812863
1711433.751416.1341383592817.6158616407206
1721451.041414.1758587529136.8641412470865
1731365.411405.87962067577-40.469620675774
1741299.881248.1332152414951.7467847585055
1751349.031316.9247418401332.105258159869
1761368.431326.266651556342.1633484436966


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
260.2333656745542590.4667313491085180.766634325445741
270.3696428602917970.7392857205835950.630357139708203
280.5317505549841650.936498890031670.468249445015835
290.4065651092164890.8131302184329770.593434890783511
300.299606489852270.5992129797045390.70039351014773
310.221994876168250.4439897523365010.77800512383175
320.1696274562833520.3392549125667040.830372543716648
330.134928940759120.269857881518240.86507105924088
340.1138373366974720.2276746733949440.886162663302528
350.085756338294770.171512676589540.91424366170523
360.05950296489856130.1190059297971230.940497035101439
370.03774675162472980.07549350324945960.96225324837527
380.03417163559428760.06834327118857530.965828364405712
390.0795977360774480.1591954721548960.920402263922552
400.1455358276923970.2910716553847940.854464172307603
410.115682353508440.231364707016880.88431764649156
420.1477996485846670.2955992971693330.852200351415333
430.1115116863328340.2230233726656680.888488313667166
440.1126823414152420.2253646828304830.887317658584758
450.1053035865567760.2106071731135520.894696413443224
460.07944123620579520.158882472411590.920558763794205
470.1034984268532540.2069968537065080.896501573146746
480.1096598593413160.2193197186826320.890340140658684
490.125159426558060.2503188531161190.87484057344194
500.09705589110952360.1941117822190470.902944108890476
510.07581583306622610.1516316661324520.924184166933774
520.06990344241630610.1398068848326120.930096557583694
530.06469816121147310.1293963224229460.935301838788527
540.09823993197562590.1964798639512520.901760068024374
550.0850143123281480.1700286246562960.914985687671852
560.06554700014056590.1310940002811320.934452999859434
570.05434109222524390.1086821844504880.945658907774756
580.04615368438940020.09230736877880040.9538463156106
590.04794145933533570.09588291867067130.952058540664664
600.06498581483378620.1299716296675720.935014185166214
610.0895555765045750.179111153009150.910444423495425
620.12394129476290.2478825895257990.8760587052371
630.19848402131720.3969680426344010.8015159786828
640.240696363206110.481392726412220.75930363679389
650.2723491107690390.5446982215380770.727650889230961
660.2480948040531260.4961896081062530.751905195946874
670.2097793548704070.4195587097408140.790220645129593
680.2179656699547080.4359313399094150.782034330045292
690.1957073422561940.3914146845123880.804292657743806
700.1620331923954410.3240663847908810.83796680760456
710.1556581676303510.3113163352607020.84434183236965
720.1536456077326680.3072912154653360.846354392267332
730.1425359683304490.2850719366608980.857464031669551
740.1352408273428090.2704816546856170.864759172657191
750.1148981209005970.2297962418011940.885101879099403
760.1404774562123420.2809549124246840.859522543787658
770.1542389744439090.3084779488878190.84576102555609
780.1688473817889030.3376947635778070.831152618211097
790.265767405346090.5315348106921810.73423259465391
800.5183857908987490.9632284182025020.481614209101251
810.6976149119825350.604770176034930.302385088017465
820.7628293026615340.4743413946769320.237170697338466
830.773424121718920.4531517565621610.22657587828108
840.7877804359720330.4244391280559350.212219564027967
850.8057810608255890.3884378783488220.194218939174411
860.8010532540114530.3978934919770940.198946745988547
870.8046014442278760.3907971115442490.195398555772124
880.7942319897448880.4115360205102240.205768010255112
890.7781536054012460.4436927891975080.221846394598754
900.8157760681657520.3684478636684960.184223931834248
910.8005974568751470.3988050862497050.199402543124853
920.780059360587980.4398812788240390.219940639412019
930.7602645350734680.4794709298530630.239735464926532
940.7241062366732450.5517875266535090.275893763326755
950.6919673856703440.6160652286593120.308032614329656
960.6802216320987980.6395567358024040.319778367901202
970.7207927245516020.5584145508967970.279207275448398
980.7278280952057060.5443438095885880.272171904794294
990.7896860401767880.4206279196464230.210313959823212
1000.8769809814994090.2460380370011830.123019018500591
1010.8615579112528370.2768841774943270.138442088747163
1020.8370496665252850.3259006669494290.162950333474715
1030.8148114658097750.3703770683804490.185188534190225
1040.8233049215691250.3533901568617490.176695078430875
1050.7897676880712990.4204646238574020.210232311928701
1060.7873966619145960.4252066761708070.212603338085404
1070.7884084115722240.4231831768555520.211591588427776
1080.8020634007296950.3958731985406090.197936599270305
1090.7977798412924040.4044403174151910.202220158707596
1100.838014774170130.3239704516597410.161985225829871
1110.8364074041699140.3271851916601730.163592595830086
1120.8316078134980420.3367843730039150.168392186501958
1130.815311133734910.3693777325301810.184688866265091
1140.8552077000700540.2895845998598920.144792299929946
1150.8460417175137040.3079165649725920.153958282486296
1160.8279275421266580.3441449157466840.172072457873342
1170.8303351415150730.3393297169698550.169664858484927
1180.8004780298812520.3990439402374950.199521970118748
1190.8783948006874030.2432103986251950.121605199312597
1200.8993841971430040.2012316057139920.100615802856996
1210.9674698040705560.06506039185888870.0325301959294444
1220.9592420521449340.08151589571013140.0407579478550657
1230.9449078446403330.1101843107193330.0550921553596666
1240.9421404505321750.115719098935650.0578595494678251
1250.9364278662206960.1271442675586080.0635721337793038
1260.9376817683362650.124636463327470.0623182316637352
1270.9450339368159950.1099321263680090.0549660631840046
1280.9445252179021050.1109495641957910.0554747820978953
1290.9249374384393580.1501251231212840.0750625615606418
1300.9024222772777970.1951554454444060.097577722722203
1310.930693808304920.1386123833901590.0693061916950793
1320.9744303881096050.05113922378079080.0255696118903954
1330.996928429398620.006143141202760620.00307157060138031
1340.999975462565034.90748699407833e-052.45374349703917e-05
1350.9999998396190393.2076192275549e-071.60380961377745e-07
1360.9999999972984295.40314262823092e-092.70157131411546e-09
1370.9999999925440351.4911930388853e-087.45596519442648e-09
1380.99999997600584.7988400345572e-082.3994200172786e-08
1390.9999999415406361.16918728134318e-075.84593640671591e-08
1400.9999999056956351.8860873044122e-079.43043652206102e-08
1410.999999732291815.3541638007725e-072.67708190038625e-07
1420.9999987777462462.44450750808191e-061.22225375404095e-06
1430.9999973873393855.22532123064641e-062.61266061532321e-06
1440.9999910351668931.79296662132601e-058.96483310663005e-06
1450.9999780759555444.38480889128657e-052.19240444564329e-05
1460.9999812990218323.74019563356824e-051.87009781678412e-05
1470.999917527581970.0001649448360609238.24724180304616e-05
1480.9998865955311480.0002268089377036590.00011340446885183
1490.9999390922147050.0001218155705890536.09077852945267e-05
1500.9992732813515170.001453437296966590.000726718648483293


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level180.144NOK
5% type I error level180.144NOK
10% type I error level250.2NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/05/t12915850991ebz0in7ewg9hgv/10vbhd1291585128.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t12915850991ebz0in7ewg9hgv/10vbhd1291585128.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t12915850991ebz0in7ewg9hgv/1oak11291585128.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t12915850991ebz0in7ewg9hgv/1oak11291585128.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t12915850991ebz0in7ewg9hgv/2oak11291585128.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t12915850991ebz0in7ewg9hgv/2oak11291585128.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t12915850991ebz0in7ewg9hgv/3oak11291585128.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t12915850991ebz0in7ewg9hgv/3oak11291585128.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t12915850991ebz0in7ewg9hgv/4hjj41291585128.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t12915850991ebz0in7ewg9hgv/4hjj41291585128.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t12915850991ebz0in7ewg9hgv/5hjj41291585128.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t12915850991ebz0in7ewg9hgv/5hjj41291585128.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t12915850991ebz0in7ewg9hgv/6hjj41291585128.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t12915850991ebz0in7ewg9hgv/6hjj41291585128.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t12915850991ebz0in7ewg9hgv/7rsj71291585128.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t12915850991ebz0in7ewg9hgv/7rsj71291585128.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t12915850991ebz0in7ewg9hgv/8k2ia1291585128.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t12915850991ebz0in7ewg9hgv/8k2ia1291585128.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/05/t12915850991ebz0in7ewg9hgv/9k2ia1291585128.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/05/t12915850991ebz0in7ewg9hgv/9k2ia1291585128.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