Home » date » 2010 » Dec » 21 »

*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, 20 Dec 2010 23:12: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/21/t1292886607jzd7km7eaon07du.htm/, Retrieved Tue, 21 Dec 2010 00:10:10 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/21/t1292886607jzd7km7eaon07du.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 «
9.4 0.5 5.1 -1.0 2504.7 9.4 0.8 5.0 3.0 2661.4 9.5 1.0 5.0 2.0 2880.4 9.5 1.3 5.1 3.0 3064.4 9.4 1.3 5.0 5.0 3141.1 9.4 1.2 4.9 5.0 3327.7 9.3 1.2 4.8 3.0 3565.0 9.4 1.0 4.5 2.0 3403.1 9.4 0.8 4.3 1.0 3149.9 9.2 0.7 4.3 -4.0 3006.8 9.1 0.6 4.2 1.0 3230.7 9.1 0.7 4.0 1.0 3361.1 9.1 1.0 3.8 6.0 3484.7 9.0 1.0 4.1 3.0 3411.1 9.0 1.3 4.2 2.0 3288.2 8.9 1.1 4.0 2.0 3280.4 8.8 0.8 4.3 2.0 3174.0 8.7 0.7 4.7 -8.0 3165.3 8.5 0.7 5.0 0.0 3092.7 8.3 0.9 5.1 -2.0 3053.1 8.1 1.3 5.4 3.0 3182.0 7.9 1.4 5.4 5.0 2999.9 7.8 1.6 5.4 8.0 3249.6 7.6 2.1 5.5 8.0 3210.5 7.4 0.3 5.8 9.0 3030.3 7.2 2.1 5.7 11.0 2803.5 7.0 2.5 5.5 13.0 2767.6 7.0 2.3 5.6 12.0 2882.6 6.8 2.4 5.6 13.0 2863.4 6.8 3.0 5.5 15.0 2897.1 6.7 1.7 5.5 13.0 3012.6 6.8 3.5 5.7 16.0 3143.0 6.7 4.0 5.6 10.0 3032.9 6.7 3.7 5.6 14.0 3045.8 6.7 3.7 5.4 14.0 3110.5 6.5 3.0 5.2 15.0 3013.2 6.3 2.7 5.1 13.0 2987.1 6.3 2.5 5.1 8.0 2995.6 6.3 2.2 5.0 7.0 2833.2 6.5 2.9 5.3 3.0 2849.0 6.6 3.1 5.4 3.0 2794.8 6.5 3.0 5.3 4.0 2845.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'RServer@AstonUniversity' @ vre.aston.ac.uk


Multiple Linear Regression - Estimated Regression Equation
werkloosheid[t] = + 11.6439743246579 -0.241949543053011hicp[t] -0.69921918814009rente[t] + 0.020441410400977consumer[t] -4.54384030752964e-05bel20[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)11.64397432465790.53911821.598200
hicp-0.2419495430530110.042087-5.748700
rente-0.699219188140090.091565-7.636300
consumer0.0204414104009770.0080032.55410.0116490.005825
bel20-4.54384030752964e-058.2e-05-0.55360.5806760.290338


Multiple Linear Regression - Regression Statistics
Multiple R0.663219509583841
R-squared0.439860117892631
Adjusted R-squared0.424822805621292
F-TEST (value)29.2512458314115
F-TEST (DF numerator)4
F-TEST (DF denominator)149
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.608830743183158
Sum Squared Residuals55.2305562028985


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
19.47.822730715033261.57726928496674
29.47.894713214773371.50528678522663
39.57.81593088548831.6840691145117
49.57.685504847993511.81449515200649
59.47.79282446209361.6071755379064
69.47.878462529199061.52153747080094
79.37.896719094161351.40328090583865
89.48.141789826270891.25821017372911
99.48.32108716576721.0789128342328
109.28.249577303547690.950422696452308
119.18.435727570223330.664272429776673
129.18.545451285785030.554548714214974
139.18.709301125881920.390698874118081
1498.44155540470330.558444595296697
1598.284191592310370.715808407689633
168.98.472779758092970.427220241907026
178.88.340433510654060.459566489345938
188.77.880921999800310.819078000199687
198.57.837986354629370.662013645370632
208.37.680591067164580.619408932835416
218.17.470395535349830.629604464650167
227.97.49535773504650.404642264953503
237.87.496946088390920.303053911609076
247.67.307826039610650.292173960389345
257.47.56219887129919-0.162198871299191
267.27.24779986323721-0.0477998632372123
2777.33337794311638-0.333377943116384
2877.28617910615834-0.286179106158341
296.87.28329797959306-0.483297979593063
306.87.24740171919358-0.447401719193582
316.77.51580516880534-0.815805168805344
326.86.99585121712382-0.19585121712382
336.76.82715267018405-0.127152670184052
346.76.98091701930419-0.280917019304191
356.77.11782099225324-0.417820992253237
366.57.45189207703857-0.951892077038566
376.37.55470198028679-1.25470198028679
386.37.50049861046637-1.20049861046637
396.37.62994317845473-1.32994317845473
406.57.1683291735031-0.668329173503099
416.67.05248010752517-0.452480107525169
426.57.16474375169015-0.664743751690153
436.37.34981044123442-1.04981044123443
446.37.41156940158932-1.11156940158932
456.57.48806883358351-0.988068833583515
4677.56164755239507-0.561647552395073
477.17.36341059237278-0.263410592372785
487.37.31063686931543-0.0106368693154297
497.37.3048401549189-0.00484015491890292
507.47.368754706907430.0312452930925702
517.47.179893832577750.220106167422253
527.37.42323420070379-0.12323420070379
537.47.4926244120732-0.092624412073195
547.57.76828807932272-0.268288079322723
557.77.8264788759236-0.126478875923606
567.77.88113944041585-0.181139440415845
577.78.121879560902-0.421879560902007
587.77.96353420087402-0.263534200874024
597.78.05679261998552-0.356792619985515
607.88.13852025579634-0.338520255796341
6188.28432594371814-0.284325943718142
628.18.18392221082336-0.0839222108233606
638.17.923610622326790.176389377673209
648.28.106089056095020.0939109439049844
658.28.56833052094801-0.368330520948014
668.28.33055735262961-0.13055735262961
678.18.08321247909950.016787520900493
688.18.071534145888550.0284658541114533
698.28.2384510000644-0.0384510000643996
708.37.895610990284240.404389009715758
718.37.910441905612680.389558094387323
728.48.073476508838030.326523491161967
738.58.20040172040420.299598279595806
748.58.42543337500830.0745666249917008
758.48.43438086019443-0.0343808601944338
7688.03189186773689-0.031891867736889
777.97.754685031864330.145314968135673
788.17.971977706546850.128022293453145
798.57.936234379071640.563765620928355
808.88.138897703174080.661102296825925
818.88.180571815810150.619428184189852
828.68.015842672664580.584157327335423
838.38.157899946014350.142100053985653
848.38.34176698358881-0.041766983588808
858.38.45466684352547-0.15466684352547
868.48.299077603800950.100922396199052
878.48.197381019556690.202618980443308
888.58.37208520012270.127914799877303
898.68.416110957028520.183889042971478
908.68.387617276110620.212382723889384
918.68.314769124138560.285230875861442
928.68.422325096063260.17767490393674
938.68.245542900959150.354457099040849
948.58.421075637403130.0789243625968748
958.48.303395735591560.0966042644084349
968.48.398114363216580.00188563678341779
978.48.332184411141060.0678155888589393
988.58.305104450050780.194895549949217
998.58.174417699755030.325582300244967
1008.67.959257819375980.640742180624018
1018.67.874274475213730.725725524786265
1028.47.969199332029930.430800667970071
1038.28.057341055144840.142658944855161
10488.21407789570396-0.214077895703957
10588.37588137188765-0.375881371887653
10688.42846317621027-0.428463176210274
10788.40257344759889-0.402573447598888
1087.97.9805006047226-0.080500604722607
1097.98.07357438145211-0.173574381452111
1107.88.22743885131626-0.427438851316263
1117.88.12324994318806-0.323249943188064
11288.10400603773644-0.104006037736443
1137.88.01041221361586-0.210412213615863
1147.47.92348402767337-0.523484027673369
1157.27.95518581610564-0.755185816105637
11677.97531081663799-0.97531081663799
11777.92264969813831-0.92264969813831
1187.27.81315108640434-0.613151086404343
1197.27.58561312528925-0.385613125289254
1207.27.47862247901918-0.278622479019176
12177.63301584956915-0.63301584956915
1226.97.67575676924658-0.775756769246579
1236.87.34447072675946-0.544470726759461
1246.87.25704371381405-0.457043713814053
1256.86.767012863290820.0329871367091839
1266.96.360481180102170.539518819897832
1277.26.526607000007870.673392999992135
1287.26.827654116960060.372345883039942
1297.26.848190616197190.351809383802812
1307.16.888761672277540.211238327722456
1317.26.482783560301090.717216439698912
1327.37.248546294511280.051453705488725
1337.57.56390931519097-0.0639093151909671
1347.67.67466680507599-0.0746668050759878
1357.78.20536923848024-0.505369238480237
1367.78.21322842325936-0.51322842325936
1377.78.27401724235105-0.574017242351048
1387.88.62887994505134-0.828879945051338
13988.95665781101074-0.956657811010738
1408.18.89716406065304-0.797164060653038
1418.18.96293770694795-0.862937706947954
14288.91512519786671-0.915125197866712
1438.18.74035722798334-0.640357227983343
1448.28.56393861823246-0.36393861823246
1458.38.37135161929754-0.0713516192975436
1468.48.44387715860777-0.0438771586077672
1478.48.351934364997820.0480656350021849
1488.48.40438381245953-0.00438381245953138
1498.58.494608507774060.00539149222593931
1508.58.317277909381680.182722090618319
1518.68.500899247769230.0991007522307683
1528.68.90991102859212-0.309911028592122
1538.58.50584978925955-0.00584978925954814
1548.58.355327263288230.144672736711773


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
80.001512817592529680.003025635185059370.99848718240747
90.0001854057217042080.0003708114434084160.999814594278296
100.0004247456460999350.000849491292199870.9995752543539
110.0003042005948853560.0006084011897707130.999695799405115
127.90081832547321e-050.0001580163665094640.999920991816745
131.80061633006874e-053.60123266013749e-050.9999819938367
142.50070260723591e-055.00140521447183e-050.999974992973928
152.20737431466015e-054.4147486293203e-050.999977926256853
161.16339619051357e-052.32679238102715e-050.999988366038095
170.0001434343358084240.0002868686716168480.999856565664192
180.000593581651224070.001187163302448140.999406418348776
190.0240001426330330.04800028526606610.975999857366967
200.1325299389621470.2650598779242940.867470061037853
210.506713476964560.9865730460708790.493286523035439
220.8610831961014720.2778336077970550.138916803898528
230.942860537649570.1142789247008580.0571394623504292
240.95665446178770.08669107642460230.0433455382123011
250.9883115847960880.0233768304078230.0116884152039115
260.9960299185093880.007940162981223030.00397008149061152
270.9972686156490550.005462768701889060.00273138435094453
280.9971275011436920.005744997712615590.0028724988563078
290.9968525252040520.006294949591896670.00314747479594834
300.9952489928067290.00950201438654220.0047510071932711
310.9969888510434350.006022297913130380.00301114895656519
320.9960196261019970.007960747796005530.00398037389800276
330.994230202347880.01153959530424050.00576979765212024
340.991563273867040.01687345226591780.00843672613295892
350.9878939289198620.02421214216027680.0121060710801384
360.9896001395106430.02079972097871430.0103998604893571
370.997045425031240.005909149937520.00295457496876
380.9997481816680180.0005036366639634260.000251818331981713
390.999992340052111.53198957802813e-057.65994789014067e-06
400.9999965602542446.87949151285109e-063.43974575642555e-06
410.9999959468017698.10639646274184e-064.05319823137092e-06
420.9999970948900725.81021985608881e-062.9051099280444e-06
430.9999997011983685.97603263483823e-072.98801631741912e-07
440.99999999092041.81592003781447e-089.07960018907237e-09
450.9999999994007021.19859596483584e-095.99297982417919e-10
460.9999999994228991.15420281867935e-095.77101409339676e-10
470.9999999989018722.19625578314894e-091.09812789157447e-09
480.9999999978369564.32608856379989e-092.16304428189995e-09
490.9999999970081925.98361531486352e-092.99180765743176e-09
500.9999999954972979.00540505003733e-094.50270252501866e-09
510.9999999942505571.14988861312934e-085.74944306564669e-09
520.9999999904326171.91347660904015e-089.56738304520075e-09
530.9999999850207332.99585334179733e-081.49792667089867e-08
540.9999999801744333.96511343556302e-081.98255671778151e-08
550.9999999615873227.68253557966879e-083.84126778983439e-08
560.9999999324566971.35086605017038e-076.75433025085189e-08
570.9999999119071031.76185794920671e-078.80928974603354e-08
580.99999988241812.35163801527166e-071.17581900763583e-07
590.999999832491793.3501642198513e-071.67508210992565e-07
600.9999997752182134.49563574871483e-072.24781787435742e-07
610.9999996781666916.43666617615998e-073.21833308807999e-07
620.9999996583517036.8329659365442e-073.4164829682721e-07
630.9999997049428385.90114323439866e-072.95057161719933e-07
640.9999995779247228.44150556713285e-074.22075278356643e-07
650.9999994539400191.0921199628672e-065.46059981433599e-07
660.9999991458089221.70838215538325e-068.54191077691627e-07
670.9999985251435432.94971291442164e-061.47485645721082e-06
680.9999975526070264.8947859483086e-062.4473929741543e-06
690.9999964716157357.05676852951705e-063.52838426475852e-06
700.999996837748826.32450236092065e-063.16225118046033e-06
710.999996753365746.4932685185939e-063.24663425929695e-06
720.999996019293597.96141282075579e-063.98070641037789e-06
730.999994522319591.09553608176361e-055.47768040881805e-06
740.9999906901093851.86197812300615e-059.30989061503077e-06
750.9999850006740142.99986519723215e-051.49993259861608e-05
760.9999748143358625.03713282760038e-052.51856641380019e-05
770.9999651169951256.9766009749699e-053.48830048748495e-05
780.9999476435157070.0001047129685854745.23564842927372e-05
790.9999650129306566.99741386875888e-053.49870693437944e-05
800.999985578800572.88423988598708e-051.44211994299354e-05
810.9999957900294128.41994117637525e-064.20997058818763e-06
820.9999980049691433.99006171410111e-061.99503085705055e-06
830.9999969537034896.09259302264063e-063.04629651132031e-06
840.9999954572381599.08552368300908e-064.54276184150454e-06
850.999993258404431.34831911387529e-056.74159556937645e-06
860.9999899954699352.00090601289056e-051.00045300644528e-05
870.9999862393477492.75213045019463e-051.37606522509731e-05
880.999978806441334.238711733888e-052.119355866944e-05
890.999965876899796.82462004178242e-053.41231002089121e-05
900.9999430879002310.0001138241995376245.6912099768812e-05
910.999911560559510.0001768788809817638.84394404908814e-05
920.9998545082774730.0002909834450545950.000145491722527297
930.9997744864535770.0004510270928463350.000225513546423167
940.9996833249335550.000633350132888950.000316675066444475
950.9995580603318340.00088387933633260.0004419396681663
960.999323685602750.001352628794502140.000676314397251069
970.9990114335396020.00197713292079530.000988566460397649
980.998713467241840.002573065516320810.00128653275816041
990.9990185991105990.001962801778801780.00098140088940089
1000.9997102754668440.0005794490663127190.000289724533156359
1010.999960821896417.83562071796633e-053.91781035898317e-05
1020.9999855973177352.88053645291227e-051.44026822645614e-05
1030.999988288330112.34233397793088e-051.17116698896544e-05
1040.9999853153824382.9369235124048e-051.4684617562024e-05
1050.9999856417811282.87164377433873e-051.43582188716937e-05
1060.999986776766462.64464670808994e-051.32232335404497e-05
1070.9999844930082683.10139834640279e-051.55069917320139e-05
1080.9999870317025522.59365948959252e-051.29682974479626e-05
1090.9999914701157241.70597685512677e-058.52988427563387e-06
1100.9999907837973371.84324053268499e-059.21620266342493e-06
1110.9999903561152191.92877695618462e-059.6438847809231e-06
1120.9999964295068437.14098631468006e-063.57049315734003e-06
1130.999999455151161.08969768201447e-065.44848841007237e-07
1140.9999997383248575.23350286257644e-072.61675143128822e-07
1150.9999997589393024.82121396060873e-072.41060698030436e-07
1160.999999695190966.09618080729122e-073.04809040364561e-07
1170.9999995274584259.45083149938993e-074.72541574969497e-07
1180.9999992119169191.57616616180477e-067.88083080902387e-07
1190.9999985977639422.8044721161559e-061.40223605807795e-06
1200.9999983499133453.30017331006989e-061.65008665503494e-06
1210.9999970105494345.97890113116135e-062.98945056558068e-06
1220.9999984807956953.03840861018528e-061.51920430509264e-06
1230.999999612211917.7557617824564e-073.8778808912282e-07
1240.9999998296543513.40691297178161e-071.70345648589081e-07
1250.9999998901692872.19661424940168e-071.09830712470084e-07
1260.9999998425618283.14876344994947e-071.57438172497474e-07
1270.9999996932885056.13422990115114e-073.06711495057557e-07
1280.999999733873245.3225352063515e-072.66126760317575e-07
1290.999999990455941.90881205253849e-089.54406026269245e-09
1300.999999999980163.9678588954611e-111.98392944773055e-11
1310.9999999999513089.73831737575585e-114.86915868787793e-11
1320.9999999999390831.21834761688629e-106.09173808443143e-11
1330.9999999997688844.62232868598362e-102.31116434299181e-10
1340.9999999991075931.78481406830263e-098.92407034151316e-10
1350.9999999954303939.13921415675004e-094.56960707837502e-09
1360.9999999946605271.06789458751805e-085.33947293759027e-09
1370.9999999956715128.65697561364473e-094.32848780682237e-09
1380.9999999989954162.00916863911136e-091.00458431955568e-09
1390.9999999933389921.33220165358602e-086.6610082679301e-09
1400.9999999494945521.01010896621492e-075.05054483107461e-08
1410.9999996584125176.83174965565502e-073.41587482782751e-07
1420.9999975989072464.80218550780434e-062.40109275390217e-06
1430.9999964490881087.10182378371427e-063.55091189185713e-06
1440.9999971213793225.75724135567058e-062.87862067783529e-06
1450.999982407848293.51843034191558e-051.75921517095779e-05
1460.9998281212209230.0003437575581529690.000171878779076485


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level1280.920863309352518NOK
5% type I error level1340.964028776978417NOK
10% type I error level1350.971223021582734NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292886607jzd7km7eaon07du/10blij1292886715.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292886607jzd7km7eaon07du/10blij1292886715.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292886607jzd7km7eaon07du/1n2l81292886715.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292886607jzd7km7eaon07du/1n2l81292886715.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292886607jzd7km7eaon07du/2ft2t1292886715.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292886607jzd7km7eaon07du/2ft2t1292886715.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292886607jzd7km7eaon07du/3ft2t1292886715.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292886607jzd7km7eaon07du/3ft2t1292886715.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292886607jzd7km7eaon07du/48ljv1292886715.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292886607jzd7km7eaon07du/48ljv1292886715.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292886607jzd7km7eaon07du/58ljv1292886715.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292886607jzd7km7eaon07du/58ljv1292886715.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292886607jzd7km7eaon07du/68ljv1292886715.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292886607jzd7km7eaon07du/68ljv1292886715.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292886607jzd7km7eaon07du/71ciy1292886715.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292886607jzd7km7eaon07du/71ciy1292886715.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/21/t1292886607jzd7km7eaon07du/81ciy1292886715.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/21/t1292886607jzd7km7eaon07du/81ciy1292886715.ps (open in new window)


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