Home » date » 2010 » Dec » 06 »

*The author of this computation has been verified*
R Software Module: /rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Mon, 06 Dec 2010 16:40:41 +0000
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653519tbux3xxgebm0lzt.htm/, Retrieved Mon, 06 Dec 2010 17:38:50 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653519tbux3xxgebm0lzt.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
3484.74 13830.14 9349.44 7977 -5.6 6 1 3.17 3411.13 14153.22 9327.78 8241 -6.2 3 1 3.17 3288.18 15418.03 9753.63 8444 -7.1 2 1.2 3.36 3280.37 16666.97 10443.5 8490 -1.4 2 1.2 3.11 3173.95 16505.21 10853.87 8388 -0.1 2 0.8 3.11 3165.26 17135.96 10704.02 8099 -0.9 -8 0.7 3.57 3092.71 18033.25 11052.23 7984 0 0 0.7 4.04 3053.05 17671 10935.47 7786 0.1 -2 0.9 4.21 3181.96 17544.22 10714.03 8086 2.6 3 1.2 4.36 2999.93 17677.9 10394.48 9315 6 5 1.3 4.75 3249.57 18470.97 10817.9 9113 6.4 8 1.5 4.43 3210.52 18409.96 11251.2 9023 8.6 8 1.9 4.7 3030.29 18941.6 11281.26 9026 6.4 9 1.8 4.81 2803.47 19685.53 10539.68 9787 7.7 11 1.9 5.01 2767.63 19834.71 10483.39 9536 9.2 13 2.2 5 2882.6 19598.93 10947.43 9490 8.6 12 2.1 4.81 2863.36 17039.97 10580.27 9736 7.4 13 2.2 5.11 2897.06 16969.28 10582.92 9694 8.6 15 2.7 5.1 3012.61 16973.38 10654.41 9647 6.2 13 2.8 5.11 3142.95 16329.89 11014.51 9753 6 16 2.9 5.21 3032.93 16153.34 10967.87 10070 6.6 10 3.4 5.21 3045.78 15311.7 10433.56 10137 5.1 14 3 5.21 3 etc...
 
Output produced by software:

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


Summary of computational transaction
Raw Inputview raw input (R code)
Raw Outputview raw output of R engine
Computing time15 seconds
R Server'George Udny Yule' @ 72.249.76.132


Multiple Linear Regression - Estimated Regression Equation
BEL_20[t] = -1599.03720837273 + 0.101061464791887Nikkei[t] + 0.369872254147376DJ_Indust[t] + 0.0144742968554702Goudprijs[t] -13.0075815890662Conjunct_Seizoenzuiver[t] + 14.0577880911957Cons_vertrouw[t] + 33.7278234341511Alg_consumptie_index_BE[t] -269.764154997347Gem_rente_kasbon_5j[t] + 99.4975226309243M1[t] + 111.784180391219M2[t] + 64.7722526051577M3[t] + 23.7198433389575M4[t] + 8.23471602593218M5[t] -12.6633778006483M6[t] + 36.2211969330588M7[t] + 46.5102316274506M8[t] + 84.1335508449912M9[t] + 149.910334438272M10[t] + 86.0422081747543M11[t] + 1.14348517765727t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-1599.03720837273365.422654-4.37592.7e-051.4e-05
Nikkei0.1010614647918870.0185115.459600
DJ_Indust0.3698722541473760.0406259.104500
Goudprijs0.01447429685547020.0209910.68950.4919140.245957
Conjunct_Seizoenzuiver-13.00758158906627.722738-1.68430.0949040.047452
Cons_vertrouw14.05778809119577.3151561.92170.057180.02859
Alg_consumptie_index_BE33.727823434151124.6396091.36880.1737870.086893
Gem_rente_kasbon_5j-269.76415499734763.228974-4.26654.2e-052.1e-05
M199.4975226309243117.366850.84770.3983860.199193
M2111.784180391219118.2926410.9450.3467030.173352
M364.7722526051577117.9669280.54910.584050.292025
M423.7198433389575118.2814890.20050.8414240.420712
M58.23471602593218115.8370610.07110.9434540.471727
M6-12.6633778006483115.818998-0.10930.913130.456565
M736.2211969330588116.4837530.3110.7564130.378206
M846.5102316274506116.7496530.39840.6911120.345556
M984.1335508449912116.0680170.72490.4700470.235024
M10149.910334438272116.0737671.29150.1991860.099593
M1186.0422081747543114.9794090.74830.4558310.227916
t1.143485177657272.7399610.41730.6772310.338616


Multiple Linear Regression - Regression Statistics
Multiple R0.943813094641892
R-squared0.890783157617505
Adjusted R-squared0.872255300427617
F-TEST (value)48.0780453178196
F-TEST (DF numerator)19
F-TEST (DF denominator)112
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation269.117649405580
Sum Squared Residuals8111522.63281751


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
13484.742808.62255748293676.117442517073
23411.132816.14460449073594.985395509268
33288.183011.68750543237276.492494567625
43280.373347.12570049667-66.75570049667
53173.953436.34346903232-262.393469032320
63165.263163.088840942772.17115905723315
73092.713404.89334452617-312.183344526174
83053.053265.13347760171-212.083477601714
93181.963220.9491968528-38.9891968527991
102999.933083.03015493371-83.1001549337123
113249.573384.18225754057-134.612257540572
123210.523364.11886361002-153.598863610019
133030.293539.27759960481-508.987599604814
142803.473325.24114318235-521.771143182348
152767.633291.41608457393-523.78608457393
162882.63440.27775944428-557.677759444277
172863.362987.19267340104-123.832673401042
182897.062992.7343023541-95.6743023541023
193012.613072.71635019271-60.1063501927108
203142.953175.01334970606-32.0633497060587
213032.933107.98789687846-75.0578968784617
223045.782955.4455235725190.334476427491
233110.522969.77080150319140.749198496806
243013.242969.8532833795743.3867166204268
252987.13029.97120326318-42.8712032631799
262995.552988.345643986737.20435601326654
272833.182663.28164303577169.898356964234
282848.962795.6081775571253.3518224428814
292794.832940.41724116218-145.587241162180
302845.262938.26566647897-93.0056664789676
312915.022789.94204359655125.077956403453
322892.632650.4283830932242.201616906799
332604.422124.96132957595479.458670424053
342641.652259.55215326141382.097846738591
352659.812391.89166008817267.918339911832
362638.532394.81886575890243.711134241104
372720.252543.56670488732176.683295112677
382745.882488.13647858727257.743521412726
392735.72707.2664815564328.4335184435654
402811.72470.28859715743341.411402842567
412799.432451.71990910627347.710090893729
422555.282156.96171915732398.318280842685
432304.981884.31788708140420.662112918596
442214.951929.01329304077285.93670695923
452065.811796.82707486377268.982925136225
461940.491780.9854445357159.504555464300
4720421896.11900096138145.880999038625
481995.371744.93884517396250.431154826039
491946.811916.5256976516930.2843023483113
501765.91748.869124130617.0308758694006
511635.251674.88519054437-39.635190544373
521833.421776.9678728400756.4521271599324
531910.432018.95454320583-108.524543205828
541959.672366.29066720967-406.620667209671
551969.62372.83446355801-403.234463558007
562061.412341.92555286725-280.515552867254
572093.482583.21889902119-489.738899021194
582120.882512.05612354128-391.176123541277
592174.562527.51597035947-352.955970359474
602196.722568.03298054503-371.312980545027
612350.442886.24202052657-535.802020526574
622440.252906.51247428389-466.262474283886
632408.642833.03251273144-424.392512731436
642472.812915.77110094659-442.961100946592
652407.62629.32047198321-221.720471983214
662454.622834.98632654039-380.366326540391
672448.052652.21085686839-204.160856868388
682497.842666.58111973673-168.741119736731
692645.642764.68137646383-119.041376463833
702756.762713.9660814096942.7939185903105
712849.272814.9860747235134.2839252764931
722921.442875.029824314246.4101756858017
732981.852964.7923140999617.0576859000381
743080.583184.00178564041-103.421785640410
753106.223192.1191489299-85.899148929897
763119.312952.39283719018166.917162809819
773061.262869.9037232058191.356276794202
783097.312969.09655585297128.21344414703
793161.693112.6246649643349.0653350356719
803257.163162.8663686631194.2936313368915
813277.013184.5198330336792.4901669663344
823295.323259.0211475249936.2988524750109
833363.993377.21330917197-13.2233091719671
843494.173501.86223964972-7.69223964971827
853667.033694.60984705601-27.5798470560133
863813.063746.8004313204166.2595686795931
873917.963675.65776147452242.302238525481
883895.513706.01865950118189.491340498825
893801.063586.76707792798214.292922072024
903570.123314.18140378979255.938596210209
913701.613349.25910807833352.350891921674
923862.273511.29728185908350.972718140922
933970.13680.75923189107289.340768108933
944138.523998.38115866742140.138841332576
954199.754005.30591265847194.444087341531
964290.893913.29420654587377.595793454128
974443.914194.01683732498249.893162675018
984502.644275.88370420499226.756295795007
994356.984013.94715652773343.032843472272
1004591.274213.93221133105377.337788668951
1014696.964431.15397063312265.806029366885
1024621.44349.20243048809272.197569511910
1034562.844409.84056454571152.999435454289
1044202.524129.8333106503172.6866893496911
1054296.494307.92401769693-11.4340176969336
1064435.234641.52263044847-206.292630448468
1074105.184145.41452511886-40.2345251188606
1084116.684240.07740634523-123.397406345227
1093844.493798.9075939339645.5824060660444
1103720.983852.17118176078-131.191181760783
1113674.43738.85546496286-64.4554649628629
1123857.623933.65824339979-76.0382433997869
1133801.063943.5865605569-142.526560556897
1143504.373525.13660820987-20.7666082098690
1153032.63096.90468604373-64.3046860437313
1163047.033161.49679542101-114.466795421005
1172962.343160.73838475211-198.398384752110
1182197.822165.8971774223431.9228225776631
1192014.451912.72507459910101.724925400897
1201862.831875.25624960617-12.4262496061659
1211905.411985.78762416858-80.377624168581
1221810.991758.3234284118352.6665715881659
1231670.071592.0610502306878.008949769321
1241864.441905.96884013565-41.5288401356504
1252052.022066.60035978536-14.5803597853576
1262029.62090.00547897607-60.405478976066
1272070.832126.99603054467-56.1660305446732
1282293.412531.63106736077-238.221067360769
1292443.272640.88275897021-197.612758970214
1302513.172715.69240468249-202.522404682485
1312466.922810.89541327531-343.975413275310
1322502.662795.76723507134-293.107235071345


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
230.1432477893930160.2864955787860310.856752210606984
240.07321870040961810.1464374008192360.926781299590382
250.04199923706658250.0839984741331650.958000762933418
260.01919039942488660.03838079884977330.980809600575113
270.007864264841819740.01572852968363950.99213573515818
280.003086911766329820.006173823532659630.99691308823367
290.001676448868918510.003352897737837030.998323551131082
300.0006863188516845740.001372637703369150.999313681148315
310.0002837450010873410.0005674900021746830.999716254998913
329.16980217966155e-050.0001833960435932310.999908301978203
338.15818149243974e-050.0001631636298487950.999918418185076
342.94520390031158e-055.89040780062315e-050.999970547960997
351.32053104965165e-052.6410620993033e-050.999986794689503
364.98916633374654e-069.97833266749309e-060.999995010833666
371.68930743681456e-063.37861487362912e-060.999998310692563
381.70186631587016e-063.40373263174032e-060.999998298133684
391.71965361642185e-063.43930723284371e-060.999998280346384
401.69902256589049e-053.39804513178098e-050.999983009774341
410.0001910041844151690.0003820083688303370.999808995815585
420.0001065933803265290.0002131867606530590.999893406619673
436.664122640398e-050.000133282452807960.999933358773596
447.18558563335686e-050.0001437117126671370.999928144143666
457.80155308520417e-050.0001560310617040830.999921984469148
460.0001497381416109410.0002994762832218820.99985026185839
470.0007517617384589420.001503523476917880.99924823826154
480.001861486546071470.003722973092142940.998138513453928
490.002726562365776290.005453124731552590.997273437634224
500.002217877436487470.004435754872974940.997782122563513
510.001379935541293670.002759871082587340.998620064458706
520.002307088975198430.004614177950396850.997692911024802
530.004904706547003250.00980941309400650.995095293452997
540.005918213784804760.01183642756960950.994081786215195
550.00671214563822410.01342429127644820.993287854361776
560.01110485196456210.02220970392912410.988895148035438
570.008993372714091320.01798674542818260.991006627285909
580.02251533240084240.04503066480168480.977484667599158
590.01991425210412370.03982850420824750.980085747895876
600.01725187037879520.03450374075759040.982748129621205
610.01788325817582220.03576651635164440.982116741824178
620.01965108822062210.03930217644124420.980348911779378
630.0598226878147170.1196453756294340.940177312185283
640.2943892332616810.5887784665233610.705610766738319
650.7171301861942870.5657396276114260.282869813805713
660.8785493648600640.2429012702798730.121450635139936
670.9509390410205760.09812191795884880.0490609589794244
680.9743483687340170.0513032625319670.0256516312659835
690.9888117445909470.02237651081810610.0111882554090531
700.9964386430604330.007122713879134690.00356135693956735
710.998819549066550.002360901866897790.00118045093344890
720.9997360103648550.0005279792702889910.000263989635144495
730.9999552494199738.95011600547486e-054.47505800273743e-05
740.9999918219797871.63560404269183e-058.17802021345915e-06
750.9999994479490861.10410182817721e-065.52050914088607e-07
760.9999998659988082.68002383356715e-071.34001191678358e-07
770.9999999798059164.03881671518795e-082.01940835759397e-08
780.9999999866672622.66654758810450e-081.33327379405225e-08
790.9999999778656184.42687631609296e-082.21343815804648e-08
800.9999999772141624.55716763995504e-082.27858381997752e-08
810.9999999593966778.12066455311474e-084.06033227655737e-08
820.9999999122648891.75470222245799e-078.77351111228994e-08
830.9999998799942262.40011547178971e-071.20005773589486e-07
840.9999998030531813.93893637745505e-071.96946818872752e-07
850.9999998086707333.82658533651996e-071.91329266825998e-07
860.999999875303962.49392082151797e-071.24696041075899e-07
870.9999999555719518.8856097620371e-084.44280488101855e-08
880.9999999926411321.47177356644605e-087.35886783223024e-09
890.9999999983607423.27851516313736e-091.63925758156868e-09
900.999999999798454.03098284684173e-102.01549142342086e-10
910.9999999994300831.13983382385728e-095.6991691192864e-10
920.9999999982840023.43199576747599e-091.71599788373799e-09
930.9999999941395881.17208237361543e-085.86041186807713e-09
940.9999999935371531.29256948434256e-086.46284742171282e-09
950.9999999820491853.59016296426999e-081.79508148213500e-08
960.9999999352718941.29456211224920e-076.47281056124602e-08
970.9999998527879322.94424135901040e-071.47212067950520e-07
980.9999997489864275.02027145903405e-072.51013572951703e-07
990.9999993821014461.23579710809519e-066.17898554047593e-07
1000.9999975588308584.88233828503801e-062.44116914251901e-06
1010.999990654370251.86912595016216e-059.34562975081078e-06
1020.99997645035994.70992801995718e-052.35496400997859e-05
1030.9999454996616650.0001090006766707855.45003383353927e-05
1040.9997801540102380.0004396919795233980.000219845989761699
1050.9993669977178470.001266004564306510.000633002282153255
1060.998892558778150.002214882443699920.00110744122184996
1070.998525097863210.002949804273578020.00147490213678901
1080.9937530859955010.01249382800899730.00624691400449863
1090.9738079722560990.05238405548780240.0261920277439012


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level640.735632183908046NOK
5% type I error level770.885057471264368NOK
10% type I error level810.93103448275862NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653519tbux3xxgebm0lzt/108ej81291653624.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653519tbux3xxgebm0lzt/108ej81291653624.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653519tbux3xxgebm0lzt/11v4w1291653624.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653519tbux3xxgebm0lzt/11v4w1291653624.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653519tbux3xxgebm0lzt/21v4w1291653624.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653519tbux3xxgebm0lzt/21v4w1291653624.ps (open in new window)


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


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


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


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653519tbux3xxgebm0lzt/65vlk1291653624.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653519tbux3xxgebm0lzt/65vlk1291653624.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653519tbux3xxgebm0lzt/7xnkn1291653624.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653519tbux3xxgebm0lzt/7xnkn1291653624.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653519tbux3xxgebm0lzt/8xnkn1291653624.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653519tbux3xxgebm0lzt/8xnkn1291653624.ps (open in new window)


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