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:38: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/t1291653412plzqkd2zgjq7mdm.htm/, Retrieved Mon, 06 Dec 2010 17:37:03 +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/t1291653412plzqkd2zgjq7mdm.htm/},
    year = {2010},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2010},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
3484.74 13830.14 9349.44 7977 -5.6 6 1 3.17 3411.13 14153.22 9327.78 8241 -6.2 3 1 3.17 3288.18 15418.03 9753.63 8444 -7.1 2 1.2 3.36 3280.37 16666.97 10443.5 8490 -1.4 2 1.2 3.11 3173.95 16505.21 10853.87 8388 -0.1 2 0.8 3.11 3165.26 17135.96 10704.02 8099 -0.9 -8 0.7 3.57 3092.71 18033.25 11052.23 7984 0 0 0.7 4.04 3053.05 17671 10935.47 7786 0.1 -2 0.9 4.21 3181.96 17544.22 10714.03 8086 2.6 3 1.2 4.36 2999.93 17677.9 10394.48 9315 6 5 1.3 4.75 3249.57 18470.97 10817.9 9113 6.4 8 1.5 4.43 3210.52 18409.96 11251.2 9023 8.6 8 1.9 4.7 3030.29 18941.6 11281.26 9026 6.4 9 1.8 4.81 2803.47 19685.53 10539.68 9787 7.7 11 1.9 5.01 2767.63 19834.71 10483.39 9536 9.2 13 2.2 5 2882.6 19598.93 10947.43 9490 8.6 12 2.1 4.81 2863.36 17039.97 10580.27 9736 7.4 13 2.2 5.11 2897.06 16969.28 10582.92 9694 8.6 15 2.7 5.1 3012.61 16973.38 10654.41 9647 6.2 13 2.8 5.11 3142.95 16329.89 11014.51 9753 6 16 2.9 5.21 3032.93 16153.34 10967.87 10070 6.6 10 3.4 5.21 3045.78 15311.7 10433.56 10137 5.1 14 3 5.21 3 etc...
 
Output produced by software:

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


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


Multiple Linear Regression - Estimated Regression Equation
BEL_20[t] = -1453.14454612382 + 0.0993347391427635Nikkei[t] + 0.361604121076399DJ_Indust[t] + 0.0162644412155995Goudprijs[t] -11.6779957473965Conjunct_Seizoenzuiver[t] + 14.3554763933654Cons_vertrouw[t] + 35.0865681640742Alg_consumptie_index_BE[t] -268.749364521601Gem_rente_kasbon_5j[t] + 1.10899673297789t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-1453.14454612382338.602291-4.29163.6e-051.8e-05
Nikkei0.09933473914276350.0174435.694900
DJ_Indust0.3616041210763990.0387649.328300
Goudprijs0.01626444121559950.0194160.83770.4038270.201913
Conjunct_Seizoenzuiver-11.67799574739657.124337-1.63920.1037330.051867
Cons_vertrouw14.35547639336546.6367922.1630.0324740.016237
Alg_consumptie_index_BE35.086568164074223.0172861.52440.1299870.064993
Gem_rente_kasbon_5j-268.74936452160156.100374-4.79055e-062e-06
t1.108996732977892.5609830.4330.6657470.332874


Multiple Linear Regression - Regression Statistics
Multiple R0.941733009782613
R-squared0.88686106171422
Adjusted R-squared0.87950243158181
F-TEST (value)120.519858418804
F-TEST (DF numerator)8
F-TEST (DF denominator)123
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation261.372491501888
Sum Squared Residuals8402816.25561026


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
13484.742766.99599832661717.744001673388
23411.132760.59989806861650.530101931395
33288.182996.74891689690291.431083103104
43280.373372.75180740797-92.381807407968
53173.953475.3089051621-301.358905162098
63165.263218.84075572269-53.5807557226873
73092.713411.14699445041-318.436994450408
83053.053262.28189469402-209.231894694022
93181.963188.39890736132-6.43890736132138
102999.932994.927545285485.00245471452145
113249.573356.05328457189-106.483284571890
123210.523422.10184302329-211.581843023293
133030.293493.91575380119-463.625753801187
142803.473276.43004090908-472.96004090908
152767.633292.32814656694-524.698146566943
162882.63477.27165405098-594.671654050984
172863.363046.67442890199-183.314428901991
182897.063075.96473293187-178.904732931872
193012.613102.70505215217-90.0950521521658
203142.953193.86656105645-50.9165610564549
213032.933090.13224952553-57.2022495255266
223045.782876.42244796443169.357552035571
233110.522952.79039961938157.72960038062
243013.243038.34774116808-25.1077411680752
252987.12995.86151343951-8.7615134395138
262995.552938.3989669017257.151033098277
272833.182664.17003993411169.009960065889
282848.962827.4343794273821.5256205726154
292794.832985.64305393771-190.81305393771
302845.263003.57214507104-158.312145071043
312915.022807.97066733130107.049332668695
322892.632658.22484954271234.405150457292
332604.422101.61162828999502.808371710012
342641.652160.4405028459481.2094971541
352659.812350.4261249428309.383875057199
362638.532443.52235378826195.007646211741
372720.252500.40131322504219.848686774959
382745.882435.14903390667310.730966093326
392735.72698.8287831069536.8712168930473
402811.72505.23423181217306.465768187828
412799.432503.86944411747295.560555882533
422555.282234.55068270027320.729317299735
432304.981918.15498204515386.825017954852
442214.951950.02393840442264.926061595576
452065.811785.46616340905280.343836590952
461940.491703.82579405983236.664205940171
4720421878.41750714963163.582492850369
481995.371812.83170590496182.538294095044
491946.811882.618992422864.1910075771997
501765.91707.0480566316958.8519433683129
511635.251672.5761125114-37.3261125114003
521833.421812.5566756444020.8633243556049
531910.432069.30894539421-158.878945394211
541959.672428.55343196377-468.883431963775
551969.62385.9292455825-416.329245582502
562061.412349.62035802939-288.210358029395
572093.482557.12926686677-463.649266866769
582120.882416.32504033649-295.445040336487
592174.562503.06966170582-328.509661705824
602196.722627.1482968952-430.428296895199
612350.442841.6957946944-491.255794694401
622440.252850.45174241149-410.201742411485
632408.642825.65221943099-417.01221943099
642472.812951.19003843712-478.380038437125
652407.62685.62274814555-278.022748145552
662454.622910.07999334351-455.459993343510
672448.052684.10744605480-236.057446054796
682497.842686.83283914415-188.992839144146
692645.642746.62255540934-100.982555409336
702756.762631.44916975138125.310830248617
712849.272789.835729293859.4342707062021
722921.442930.43082828954-8.9908282895366
732981.852922.5735749592959.2764250407144
743080.583126.51298782886-45.9329878288583
753106.223181.83309590241-75.6130959024082
763119.312982.38727777720136.922722222796
773061.262911.52610162273149.733898377267
783097.313032.3863665485664.9236334514366
793161.693125.2045199875236.485480012479
803257.163165.5709529906891.5890470093196
813277.013153.41500478357123.594995216432
823295.323167.71154467449127.608455325514
833363.993347.1142950540716.8757049459335
843494.173558.78494180609-64.6149418060879
853667.033653.5575817530113.4724182469878
863813.063694.60315973038118.456840269625
873917.963668.40051437262249.559485627384
883895.513743.08366498578152.426335014223
893801.063641.92529581188159.134704188118
903570.123393.84336546784176.276634532159
913701.613382.55303153513319.056968464874
923862.273529.39833496757332.871665032427
933970.13655.44302808518314.656971914825
944138.523905.42625764075233.093742359249
954199.753974.79763465317224.952365346829
964290.893964.48676149641326.403238503586
974443.914145.46477375467298.445226245325
984502.644213.92831940261288.711680597393
994356.984000.21858938473356.761410615274
1004591.274240.71722728879350.552772711214
1014696.964467.93176180266229.028238197345
1024621.44407.46739411615213.932605883853
1034562.844415.41773882690147.422261173104
1044202.524127.7537629168574.7662370831509
1054296.494267.3823352875829.1076647124179
1064435.234530.31687238-95.0868723799948
1074105.184106.26083258733-1.08083258732591
1084116.684283.6965492157-167.016549215705
1093844.493758.6727565625985.8172434374094
1103720.983802.86261229744-81.882612297439
1113674.43741.10135503184-66.7013550318403
1123857.623962.33544481343-104.715444813430
1133801.063989.28702924991-188.227029249910
1143504.373596.07062259521-91.7006225952081
1153032.63125.33911141335-92.7391114133531
1163047.033176.78805032003-129.758050320029
1172962.343137.48724704799-175.147247047995
1182197.822088.75824631426109.061753685742
1192014.451889.62177411535124.82822588465
1201862.831928.41603708707-65.5860370870748
1211905.411945.94402890318-40.534028903176
1221810.991711.0124540802899.9775459197183
1231670.071591.5582400499678.5117599500431
1241864.441940.30180012867-75.861800128671
1252052.022114.29123165485-62.2712316548458
1262029.62160.53269950454-130.932699504540
1272070.832147.97412065966-77.1441206596634
1282293.412544.51899788509-251.108997885092
1292443.272615.2261978545-171.956197854502
1302513.172628.69965800967-115.529658009673
1312466.922797.07993264529-330.159932645292
1322502.662866.84394707277-364.183947072775


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
120.04765750702049630.09531501404099260.952342492979504
130.02021091275147760.04042182550295520.979789087248522
140.03395080268154180.06790160536308360.966049197318458
150.03180803184742950.0636160636948590.96819196815257
160.02085549085009610.04171098170019220.979144509149904
170.01340675410072970.02681350820145950.98659324589927
180.00790095328273080.01580190656546160.99209904671727
190.008180633514197340.01636126702839470.991819366485803
200.007192952043100930.01438590408620190.992807047956899
210.004738456927480190.009476913854960380.99526154307252
220.004058274917684050.00811654983536810.995941725082316
230.002449288739128340.004898577478256690.997550711260872
240.001274194853419240.002548389706838470.99872580514658
250.0006173152350082650.001234630470016530.999382684764992
260.000281050343624140.000562100687248280.999718949656376
270.0001202761646789150.0002405523293578310.999879723835321
286.26728633115159e-050.0001253457266230320.999937327136688
295.27441511857481e-050.0001054883023714960.999947255848814
303.58548924674708e-057.17097849349417e-050.999964145107533
312.78812692165773e-055.57625384331546e-050.999972118730783
321.45281700170890e-052.90563400341779e-050.999985471829983
338.30034695056207e-061.66006939011241e-050.99999169965305
346.76560623678206e-061.35312124735641e-050.999993234393763
354.27770718206606e-068.55541436413212e-060.999995722292818
361.93118332393193e-063.86236664786385e-060.999998068816676
378.75721984740245e-071.75144396948049e-060.999999124278015
386.43131381251995e-071.28626276250399e-060.999999356868619
393.51726586945225e-077.0345317389045e-070.999999648273413
403.19698350180899e-066.39396700361798e-060.999996803016498
416.99883321185139e-061.39976664237028e-050.999993001166788
423.94928057510057e-067.89856115020114e-060.999996050719425
432.36821782852202e-064.73643565704404e-060.999997631782171
442.43961072146233e-064.87922144292466e-060.999997560389279
452.89631760488448e-065.79263520976896e-060.999997103682395
469.58847870474431e-061.91769574094886e-050.999990411521295
472.39219962583601e-054.78439925167203e-050.999976078003742
484.63647264392903e-059.27294528785807e-050.99995363527356
498.22842318976783e-050.0001645684637953570.999917715768102
508.68382479638484e-050.0001736764959276970.999913161752036
516.90242134638745e-050.0001380484269277490.999930975786536
520.0001563030552506040.0003126061105012090.99984369694475
530.0002331630922224570.0004663261844449140.999766836907778
540.0002373796005589710.0004747592011179420.99976262039944
550.0004376236164515630.0008752472329031260.999562376383548
560.001013169376270490.002026338752540980.99898683062373
570.001475412850972990.002950825701945980.998524587149027
580.006153526683110020.01230705336622000.99384647331689
590.007503703006175070.01500740601235010.992496296993825
600.006361310876811250.01272262175362250.993638689123189
610.007337150769906030.01467430153981210.992662849230094
620.008889906092767020.01777981218553400.991110093907233
630.02568404603411970.05136809206823950.97431595396588
640.1613115086535450.3226230173070890.838688491346455
650.3787796114054210.7575592228108410.62122038859458
660.6957846427463790.6084307145072420.304215357253621
670.8716830378755390.2566339242489220.128316962124461
680.956245283676550.0875094326469010.0437547163234505
690.9884993629371420.02300127412571550.0115006370628577
700.997662059147190.004675881705618850.00233794085280943
710.9992918123856510.001416375228697220.000708187614348611
720.9998523050836430.0002953898327131690.000147694916356584
730.9999693744451536.12511096947673e-053.06255548473837e-05
740.9999928767671771.42464656451399e-057.12323282256996e-06
750.9999981306855343.73862893208016e-061.86931446604008e-06
760.9999992979316611.40413667753727e-067.02068338768634e-07
770.9999995621793298.75641342515923e-074.37820671257961e-07
780.9999995844640328.31071935920193e-074.15535967960096e-07
790.9999994722180511.05556389811456e-065.27781949057281e-07
800.9999993626682351.27466353017977e-066.37331765089884e-07
810.9999992036128481.59277430462590e-067.9638715231295e-07
820.999998985212652.02957469974918e-061.01478734987459e-06
830.999998794481792.41103642036709e-061.20551821018355e-06
840.999999685882766.28234480159581e-073.14117240079791e-07
850.9999999274112761.45177447640092e-077.25887238200459e-08
860.9999999528179839.43640336154442e-084.71820168077221e-08
870.9999999348221331.3035573479117e-076.5177867395585e-08
880.9999999757920374.84159261112242e-082.42079630556121e-08
890.9999999969075626.18487627510569e-093.09243813755285e-09
900.9999999994184831.16303350765796e-095.81516753828979e-10
910.999999999447461.10508165918326e-095.52540829591632e-10
920.9999999995535468.92908118445662e-104.46454059222831e-10
930.9999999996581856.836306062013e-103.41815303100650e-10
940.999999999941691.16619021726663e-105.83095108633314e-11
950.9999999999949721.00565369558518e-115.0282684779259e-12
960.9999999999946221.07570015620056e-115.37850078100281e-12
970.9999999999956858.63037439632665e-124.31518719816333e-12
980.9999999999898312.03377044008344e-111.01688522004172e-11
990.999999999967346.53210895503978e-113.26605447751989e-11
1000.9999999998997612.00477861183788e-101.00238930591894e-10
1010.999999999681816.36380913404988e-103.18190456702494e-10
1020.9999999991315791.73684199806065e-098.68420999030325e-10
1030.9999999982424563.51508765695705e-091.75754382847853e-09
1040.9999999936882621.26234752767366e-086.31173763836831e-09
1050.9999999770669744.58660512138252e-082.29330256069126e-08
1060.9999999296791931.40641614874939e-077.03208074374695e-08
1070.9999997754084984.491830040018e-072.245915020009e-07
1080.9999995898189838.20362034704074e-074.10181017352037e-07
1090.999999148743281.70251344176004e-068.5125672088002e-07
1100.9999984259373363.14812532838379e-061.57406266419189e-06
1110.9999980058593623.98828127691557e-061.99414063845779e-06
1120.9999922282947071.55434105854535e-057.77170529272677e-06
1130.9999782703302974.34593394055065e-052.17296697027533e-05
1140.9999554389959168.9122008167321e-054.45610040836605e-05
1150.9998166387321020.0003667225357953260.000183361267897663
1160.9993154231962710.001369153607457750.000684576803728874
1170.9980508111840740.003898377631851580.00194918881592579
1180.9927954537470040.01440909250599300.00720454625299652
1190.9992415428596850.00151691428063010.00075845714031505
1200.994715894573290.01056821085341910.00528410542670957


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level860.788990825688073NOK
5% type I error level1000.91743119266055NOK
10% type I error level1050.963302752293578NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653412plzqkd2zgjq7mdm/10yllm1291653511.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653412plzqkd2zgjq7mdm/10yllm1291653511.ps (open in new window)


http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653412plzqkd2zgjq7mdm/1926s1291653511.png (open in new window)
http://www.freestatistics.org/blog/date/2010/Dec/06/t1291653412plzqkd2zgjq7mdm/1926s1291653511.ps (open in new window)


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


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


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


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


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


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


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


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


 
Parameters (Session):
par1 = 1 ; par2 = Do not include Seasonal Dummies ; par3 = Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Do not include Seasonal 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