Home » date » 2009 » Dec » 13 »

paper

*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, 13 Dec 2009 03:32:52 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/13/t1260700464bbjs2anchh7n0v7.htm/, Retrieved Sun, 13 Dec 2009 11:34:37 +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/2009/Dec/13/t1260700464bbjs2anchh7n0v7.htm/},
    year = {2009},
}
@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 = {2009},
    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 «
6.5 2.77 6.6 6.7 6.8 6.9 6.5 2.64 6.5 6.6 6.7 6.8 7.0 2.56 6.5 6.5 6.6 6.7 7.5 2.07 7.0 6.5 6.5 6.6 7.6 2.32 7.5 7.0 6.5 6.5 7.6 2.16 7.6 7.5 7.0 6.5 7.6 2.23 7.6 7.6 7.5 7.0 7.8 2.40 7.6 7.6 7.6 7.5 8.0 2.84 7.8 7.6 7.6 7.6 8.0 2.77 8.0 7.8 7.6 7.6 8.0 2.93 8.0 8.0 7.8 7.6 7.9 2.91 8.0 8.0 8.0 7.8 7.9 2.69 7.9 8.0 8.0 8.0 8.0 2.38 7.9 7.9 8.0 8.0 8.5 2.58 8.0 7.9 7.9 8.0 9.2 3.19 8.5 8.0 7.9 7.9 9.4 2.82 9.2 8.5 8.0 7.9 9.5 2.72 9.4 9.2 8.5 8.0 9.5 2.53 9.5 9.4 9.2 8.5 9.6 2.70 9.5 9.5 9.4 9.2 9.7 2.42 9.6 9.5 9.5 9.4 9.7 2.50 9.7 9.6 9.5 9.5 9.6 2.31 9.7 9.7 9.6 9.5 9.5 2.41 9.6 9.7 9.7 9.6 9.4 2.56 9.5 9.6 9.7 9.7 9.3 2.76 9.4 9.5 9.6 9.7 9.6 2.71 9.3 9.4 9.5 9.6 10.2 2.44 9.6 9.3 9.4 9.5 10.2 2.46 10.2 9.6 9.3 9.4 10.1 2.12 10.2 10.2 9.6 9.3 9.9 1.99 10.1 10.2 10.2 9.6 9.8 1.86 9.9 10.1 10.2 10.2 9.8 1.88 9.8 9.9 10.1 10.2 9.7 1.82 9.8 9.8 9.9 10.1 9.5 1.74 9.7 9.8 9.8 9.9 9.3 1.71 9.5 9.7 9.8 9.8 9.1 1.38 9.3 9.5 9.7 9.8 9.0 1.27 9.1 9.3 9.5 9.7 9.5 1.19 9.0 9.1 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 time6 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = + 0.103329771420464 + 0.0213844325900316X[t] + 1.38121539673783Y1[t] -0.434524571311922Y2[t] -0.253938773069359Y3[t] + 0.283796486784859Y4[t] -0.0427107358517383M1[t] + 0.0132171205717539M2[t] + 0.562383896769684M3[t] + 0.219755046500052M4[t] -0.00184900361398463M5[t] + 0.159889281175896M6[t] + 0.102181838949999M7[t] + 0.191043321198795M8[t] + 0.121577999327065M9[t] -0.0423727220174399M10[t] -0.0197066669911787M11[t] -0.000546832253316618t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)0.1033297714204640.1591210.64940.5170370.258518
X0.02138443259003160.0207241.03190.3037060.151853
Y11.381215396737830.07625718.112700
Y2-0.4345245713119220.132308-3.28420.001260.00063
Y3-0.2539387730693590.132365-1.91850.0568540.028427
Y40.2837964867848590.0760913.72970.0002670.000133
M1-0.04271073585173830.062477-0.68360.4952170.247609
M20.01321712057175390.0634940.20820.835370.417685
M30.5623838967696840.0640138.785400
M40.2197550465000520.0791072.77790.0061330.003067
M5-0.001849003613984630.08039-0.0230.9816790.490839
M60.1598892811758960.0724672.20640.0288010.0144
M70.1021818389499990.0658691.55130.1228320.061416
M80.1910433211987950.0616773.09750.002310.001155
M90.1215779993270650.0649251.87260.0629730.031486
M10-0.04237272201743990.066381-0.63830.5241830.262091
M11-0.01970666699117870.063727-0.30920.7575490.378775
t-0.0005468322533166180.000269-2.03620.04340.0217


Multiple Linear Regression - Regression Statistics
Multiple R0.988871370422935
R-squared0.977866587242134
Adjusted R-squared0.9754851440973
F-TEST (value)410.619329444628
F-TEST (DF numerator)17
F-TEST (DF denominator)158
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.165843506022096
Sum Squared Residuals4.34564282137274


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
16.56.5554261742135-0.0554261742134966
26.56.51037236823283-0.0103723682328288
377.09774824332988-0.09774824332988
47.57.431716115835180.0682838841648196
57.67.6598771056498-0.0598771056498073
67.67.61153691645511-0.0115369164551084
77.67.526255951983750.0737440480162446
87.87.734710321605030.0652896783949673
987.978730045845650.0212699541543462
1088.00207374705171-0.00207374705171083
1187.88992181016280.110078189837195
127.97.91462549899197-0.0146254989919655
137.97.78530111340030.114698886599707
1487.877505420598750.122494579401249
158.58.59391766804209-0.093917668042089
169.28.88256208195830.317437918041701
179.49.376693574286220.0233064257137833
189.59.409232725136810.0907672748631918
199.59.362273136120760.137726863879236
209.69.558640468660890.0413595313391135
219.79.652127633134450.0478723668655492
229.79.61238956536490.0876104346350919
239.69.561599411507620.0384005884923821
249.59.447761921202250.0522380787977494
259.49.34142258412160.0585774158784047
269.39.33180528957412-0.0318052895741221
279.69.7817011579751-0.181701157975095
2810.29.887582983433830.312417016566173
2910.210.3612458849958-0.161245884995846
3010.110.1498906070654-0.0498906070653545
319.99.88351049886950.0164895011305049
329.89.90653244248281-0.106532442482812
339.89.8111252289051-0.0111252289051036
349.79.71120517241846-0.0112051724184589
359.59.56212668086038-0.0621266808603795
369.39.31947471172568-0.0194747117256815
379.19.10521599308767-0.005215993087672
3898.991314670523150.00868532947685446
399.59.481035691706060.0189643082939415
40109.867873220873220.132126779126779
4110.210.08577773223570.114222267764316
4210.110.1512424762284-0.0512424762283885
43109.888236712818270.111763287181735
449.99.97277892472381-0.0727789247238114
45109.90094307901510.099056920984902
469.99.9133229962435-0.0133229962434981
479.79.75409011572842-0.0540901157284234
489.59.486899646590390.0131003534096119
499.29.30508361882297-0.105083618822970
5099.05327460091056-0.0532746009105622
519.39.4526034260689-0.152603426068890
529.89.630119611393510.169880388606489
539.89.93493708620941-0.134937086209412
549.69.75640369578135-0.156403695781353
559.49.377937458196350.0220625418036537
569.39.42244754003938-0.122447540039379
579.29.347301939947-0.147301939947001
589.29.075106898308770.124893101691225
5999.09819325321606-0.0981932532160595
608.88.8338473507168-0.0338473507167997
618.78.579714987276890.120285012723111
628.78.638088649863940.0619113501360601
639.19.22739717308515-0.127397173085151
649.79.40448685190370.295513148096302
659.89.80395731088008-0.00395731088007977
669.69.73413703264672-0.134137032646724
679.49.319908684471880.0800913155281188
689.49.357995387346850.0420046126531497
699.59.438444914985820.061555085014176
709.49.4129403767475-0.0129403767474939
719.39.20271394648370.0972860535162994
729.29.112289193341150.0877108066588468
7399.03562062008544-0.0356206200854371
748.98.849451453868380.0505485461316185
759.29.33189371877963-0.131893718779630
769.89.456326403116490.343673596883514
779.99.90930805173243-0.00930805173243436
789.69.84420039785994-0.244200397859937
799.29.25491708829681-0.054917088296814
809.19.066200810080620.0337991899193833
819.19.14413662113826-0.0441366211382616
8299.04016962084162-0.0401696208416182
838.98.841388694681280.0586113053187203
848.78.73621673224266-0.0362167322426645
858.58.478505556473460.0214944435265415
868.38.3394242009279-0.0394242009278998
878.58.71918948678962-0.219189486789616
888.78.73875020760693-0.038750207606925
898.48.70595358870686-0.305953588706861
908.18.26068074357375-0.160680743573754
917.87.92930918370557-0.129309183705573
927.77.87532513271297-0.175325132712971
937.57.78538383130457-0.285383831304565
947.27.38255985059012-0.182559850590123
956.87.02410347397849-0.224103473978491
966.76.638838052180380.0611619478196247
976.46.65325723940095-0.253257239400946
986.36.36677948010137-0.0667794801013696
996.86.82036591566237-0.0203659156623685
1007.37.260976970814950.0390230291850474
1017.17.46269096007525-0.362690960075248
10276.9666880836850.0333119163149927
1036.86.87492601688885-0.0749260168888494
1046.66.91009153879434-0.310091538794336
1056.36.61317431408296-0.313174314082963
1066.16.14469438329106-0.0446943832910636
1076.16.011534846152510.0884651538474875
1086.36.151991032529620.148008967470383
1096.36.35810990375705-0.0581099037570537
11066.26533598546397-0.265335985463967
1116.26.34281591464815-0.142815914648150
1126.46.46342766887512-0.0634276688751165
1136.86.498028966151840.301971033848160
1147.56.990799561404930.509200438595075
1157.57.72685320369072-0.226853203690718
1167.67.467253663526580.132746336473417
1177.67.486521294105530.113478705894465
1187.47.47145502732661-0.0714550273266129
1197.37.192792670748660.107207329251342
1207.17.17072491672618-0.070724916726179
1216.96.9351999533754-0.0351999533754058
1226.86.760254397744850.0397456022551489
1237.57.288619595249460.211380404750537
1247.67.94934791617929-0.349347916179288
1257.87.529785953517340.270214046482663
12687.718272771420940.281727228579061
1278.18.018557283277270.0814427167227327
1288.28.141454249548070.0585457504519322
1298.38.168661211494310.131338788505694
1308.28.141531909761830.0584680902381685
13187.985490595753150.0145094042468520
1327.97.768857938520980.131142061479022
1337.67.71874812065033-0.118748120650334
1347.67.438028059767950.161971940232045
1358.38.08285997881940.217140021180596
1368.48.76075238703227-0.36075238703227
1378.48.28763074271080.112369257289203
1388.48.222908021797810.177091978202189
1398.48.343905051886270.0560949481137286
1408.68.458033218649430.141966781350567
1418.98.661056478983450.238943521016553
1428.88.81696176738988-0.0169617673898806
1438.38.5170343482449-0.217034348244890
1447.57.88651030892732-0.386510308927318
1457.27.080830790917470.119169209082527
1467.47.160572039565520.239427960434481
1478.88.180252874202840.619747125797162
1489.39.52981061045488-0.229810610454884
1499.39.249087906474720.0509120935252796
1508.78.91201116746492-0.212011167464921
1518.28.28874417580422-0.0887441758042202
1528.38.083076472485160.216923527514844
1538.58.52059756320557-0.0205975632055718
1548.68.55221130039080.047788699609204
1558.58.468947244170790.031052755829211
1568.28.27749580206538-0.0774958020653822
1578.17.88934538397270.210654616027303
1587.97.9984341615805-0.0984341615804984
1598.68.367839263350370.232160736649630
1608.79.01803267110006-0.318032671100063
1618.78.653313456053030.0466865439469646
1628.58.52178075446576-0.0217807544657625
1638.48.362685507340450.0373144926595483
1648.58.435006199031830.0649938009681715
1658.78.591795843852220.108204156147779
1668.78.623377384273230.0766226157267711
1678.68.490062908311240.109937091688754
1688.58.354466894239250.145533105760753
1698.38.278217960444280.0217820395557200
17088.11935922127621-0.119359221276209
1718.28.331759892291-0.131759892290998
1728.18.41823429942228-0.318234299422278
1738.17.981711680320680.118288319679319
17488.0502150450132-0.0502150450132071
1757.97.94198004664933-0.0419800466493269
1767.97.91045363031223-0.0104536303122343


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
210.02564177331000140.05128354662000270.974358226689999
220.007660500913546120.01532100182709220.992339499086454
230.001889022788723980.003778045577447970.998110977211276
240.0005744799059802570.001148959811960510.99942552009402
250.0007823252055835070.001564650411167010.999217674794416
260.004314947895864490.008629895791728980.995685052104135
270.004018663600251820.008037327200503650.995981336399748
280.003814858861008470.007629717722016940.996185141138991
290.002161300069528290.004322600139056580.997838699930472
300.0009855867603903520.001971173520780700.99901441323961
310.0007238571232638180.001447714246527640.999276142876736
320.0003481400537466150.000696280107493230.999651859946253
330.0001718264733473830.0003436529466947650.999828173526653
349.04031170597179e-050.0001808062341194360.99990959688294
353.4938712208363e-056.9877424416726e-050.999965061287792
361.30535513669528e-052.61071027339055e-050.999986946448633
374.91284214334274e-069.82568428668548e-060.999995087157857
381.81441482595225e-063.6288296519045e-060.999998185585174
393.15698544580101e-066.31397089160203e-060.999996843014554
402.12991774001641e-064.25983548003282e-060.99999787008226
411.5741883470396e-063.1483766940792e-060.999998425811653
421.60851405194542e-063.21702810389085e-060.999998391485948
438.4633244253762e-071.69266488507524e-060.999999153667557
448.33170012396538e-071.66634002479308e-060.999999166829988
454.23997694732940e-078.47995389465879e-070.999999576002305
461.63483083564452e-073.26966167128903e-070.999999836516916
478.76991808704505e-081.75398361740901e-070.99999991230082
483.33568827539422e-086.67137655078844e-080.999999966643117
492.67706312882558e-085.35412625765115e-080.999999973229369
501.19292433362938e-082.38584866725877e-080.999999988070757
515.02210243548735e-091.00442048709747e-080.999999994977897
524.08834891727955e-098.1766978345591e-090.99999999591165
531.57123206612791e-093.14246413225583e-090.999999998428768
547.98750691677433e-101.59750138335487e-090.99999999920125
553.07078669327455e-106.14157338654909e-100.999999999692921
561.16567420977709e-102.33134841955417e-100.999999999883433
576.25384580045258e-111.25076916009052e-100.999999999937462
582.27528399435147e-104.55056798870295e-100.999999999772472
598.7885927654641e-111.75771855309282e-100.999999999912114
603.41772348202262e-116.83544696404525e-110.999999999965823
612.31561575634861e-114.63123151269723e-110.999999999976844
621.67700254733173e-113.35400509466346e-110.99999999998323
637.2735215312878e-121.45470430625756e-110.999999999992726
649.99755495212846e-121.99951099042569e-110.999999999990002
653.59910306332674e-127.19820612665349e-120.999999999996401
667.22625933509563e-121.44525186701913e-110.999999999992774
674.7839062872756e-129.5678125745512e-120.999999999995216
682.67023883336865e-125.34047766673729e-120.99999999999733
691.63351879801817e-123.26703759603635e-120.999999999998366
707.68882304373706e-131.53776460874741e-120.99999999999923
713.51899125079628e-137.03798250159255e-130.999999999999648
722.16891407430430e-134.33782814860861e-130.999999999999783
739.8742717660507e-141.97485435321014e-130.9999999999999
744.8325907832023e-149.6651815664046e-140.999999999999952
753.22771163065739e-146.45542326131477e-140.999999999999968
763.86349647352105e-137.7269929470421e-130.999999999999614
771.63746365774282e-133.27492731548564e-130.999999999999836
781.14689811258152e-122.29379622516304e-120.999999999998853
791.14441526904209e-112.28883053808418e-110.999999999988556
806.10133596490961e-121.22026719298192e-110.999999999993899
813.05061853071497e-126.10123706142994e-120.99999999999695
821.36626758393504e-122.73253516787008e-120.999999999998634
831.12345678981061e-122.24691357962122e-120.999999999998877
845.25396636565103e-131.05079327313021e-120.999999999999475
853.02605129368044e-136.05210258736088e-130.999999999999697
862.73449182860352e-135.46898365720704e-130.999999999999727
873.11301048128411e-136.22602096256821e-130.999999999999689
881.39856172406620e-112.79712344813241e-110.999999999986014
893.26686383676781e-116.53372767353562e-110.999999999967331
902.47258291768599e-114.94516583537198e-110.999999999975274
911.17428548632938e-112.34857097265877e-110.999999999988257
926.15833587078288e-121.23166717415658e-110.999999999993842
931.93026822267036e-113.86053644534072e-110.999999999980697
941.28884667578524e-112.57769335157047e-110.999999999987112
951.19890830689201e-112.39781661378403e-110.99999999998801
969.19711435906795e-111.83942287181359e-100.999999999908029
971.52295713006762e-103.04591426013525e-100.999999999847704
989.10045517936788e-111.82009103587358e-100.999999999908995
992.40289959694698e-104.80579919389396e-100.99999999975971
1004.08816670169946e-108.17633340339892e-100.999999999591183
1013.43006997377408e-086.86013994754816e-080.9999999656993
1024.42536487452627e-088.85072974905255e-080.999999955746351
1032.38031514918584e-084.76063029837168e-080.999999976196849
1043.3460621674188e-076.6921243348376e-070.999999665393783
1059.35759795158181e-061.87151959031636e-050.999990642402048
1067.50111564958514e-061.50022312991703e-050.99999249888435
1072.08622339310682e-054.17244678621363e-050.99997913776607
1088.0627757661402e-050.0001612555153228040.999919372242339
1097.825291541669e-050.000156505830833380.999921747084583
1100.0004171589685862620.0008343179371725250.999582841031414
1110.001361409680833210.002722819361666420.998638590319167
1120.001810758789890820.003621517579781630.99818924121011
1130.02181709501814910.04363419003629830.97818290498185
1140.1557601389595670.3115202779191340.844239861040433
1150.3251819200413660.6503638400827320.674818079958634
1160.3497815699924550.6995631399849090.650218430007546
1170.3027101340200070.6054202680400150.697289865979993
1180.3032509777822860.6065019555645720.696749022217714
1190.272992472170180.545984944340360.72700752782982
1200.2985379469986240.5970758939972490.701462053001376
1210.3296783103676240.6593566207352490.670321689632376
1220.2920315041594330.5840630083188660.707968495840567
1230.3597208350169450.719441670033890.640279164983055
1240.5494605067191910.9010789865616180.450539493280809
1250.5754237234595730.8491525530808530.424576276540427
1260.5663395862887570.8673208274224860.433660413711243
1270.534066858148220.931866283703560.46593314185178
1280.4967596381472650.993519276294530.503240361852735
1290.4464380062538970.8928760125077940.553561993746103
1300.3892813297269870.7785626594539740.610718670273013
1310.3405855003338230.6811710006676460.659414499666177
1320.3181544992223940.6363089984447880.681845500777606
1330.4349068498793270.8698136997586550.565093150120673
1340.4465597616711490.8931195233422980.553440238328851
1350.4494300997755190.8988601995510380.550569900224481
1360.479296911612580.958593823225160.52070308838742
1370.4258660924904520.8517321849809030.574133907509548
1380.4259056136314790.8518112272629580.574094386368521
1390.3769620489975730.7539240979951460.623037951002427
1400.3319363015356350.663872603071270.668063698464365
1410.425780484568350.85156096913670.57421951543165
1420.3577029125675950.7154058251351890.642297087432405
1430.3533194750324840.7066389500649690.646680524967516
1440.6911264214746960.6177471570506070.308873578525304
1450.6910251843611620.6179496312776770.308974815638838
1460.6336277799750190.7327444400499630.366372220024981
1470.8888991867425190.2222016265149620.111100813257481
1480.8644165905843260.2711668188313480.135583409415674
1490.9001008045707020.1997983908585970.0998991954292984
1500.862838099110470.2743238017790610.137161900889530
1510.8203227848013330.3593544303973330.179677215198666
1520.7577875128099850.484424974380030.242212487190015
1530.6473635676676160.7052728646647670.352636432332384
1540.5023628394412640.9952743211174720.497637160558736
1550.470237060639070.940474121278140.52976293936093


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level900.666666666666667NOK
5% type I error level920.681481481481481NOK
10% type I error level930.688888888888889NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260700464bbjs2anchh7n0v7/10ahn01260700365.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260700464bbjs2anchh7n0v7/10ahn01260700365.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/13/t1260700464bbjs2anchh7n0v7/12dhb1260700365.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260700464bbjs2anchh7n0v7/12dhb1260700365.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/13/t1260700464bbjs2anchh7n0v7/20d5w1260700365.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260700464bbjs2anchh7n0v7/20d5w1260700365.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/13/t1260700464bbjs2anchh7n0v7/30x981260700365.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260700464bbjs2anchh7n0v7/30x981260700365.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/13/t1260700464bbjs2anchh7n0v7/4sa5o1260700365.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260700464bbjs2anchh7n0v7/4sa5o1260700365.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/13/t1260700464bbjs2anchh7n0v7/5lw9s1260700365.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260700464bbjs2anchh7n0v7/5lw9s1260700365.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/13/t1260700464bbjs2anchh7n0v7/67bo11260700365.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260700464bbjs2anchh7n0v7/67bo11260700365.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/13/t1260700464bbjs2anchh7n0v7/79xx61260700365.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260700464bbjs2anchh7n0v7/79xx61260700365.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/13/t1260700464bbjs2anchh7n0v7/8odl21260700365.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260700464bbjs2anchh7n0v7/8odl21260700365.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/13/t1260700464bbjs2anchh7n0v7/9msx01260700365.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/13/t1260700464bbjs2anchh7n0v7/9msx01260700365.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