Home » date » 2009 » Dec » 14 »

Multiple Regression (invoer) (monthly dummies, linear trend)

*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, 14 Dec 2009 04:40:33 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we.htm/, Retrieved Mon, 14 Dec 2009 12:43:29 +0100
 
BibTeX entries for LaTeX users:
@Manual{KEY,
    author = {{YOUR NAME}},
    publisher = {Office for Research Development and Education},
    title = {Statistical Computations at FreeStatistics.org, URL http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we.htm/},
    year = {2009},
}
@Manual{R,
    title = {R: A Language and Environment for Statistical Computing},
    author = {{R Development Core Team}},
    organization = {R Foundation for Statistical Computing},
    address = {Vienna, Austria},
    year = {2009},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
7787.0 0 8474.2 0 9154.7 0 8557.2 0 7951.1 0 9156.7 0 7865.7 0 7337.4 0 9131.7 0 8814.6 0 8598.8 0 8439.6 0 7451.8 0 8016.2 0 9544.1 0 8270.7 0 8102.2 0 9369.0 0 7657.7 0 7816.6 0 9391.3 0 9445.4 0 9533.1 0 10068.7 0 8955.5 0 10423.9 0 11617.2 0 9391.1 0 10872.0 0 10230.4 0 9221.0 0 9428.6 0 10934.5 0 10986.0 0 11724.6 0 11180.9 0 11163.2 0 11240.9 0 12107.1 0 10762.3 0 11340.4 0 11266.8 0 9542.7 0 9227.7 0 10571.9 1 10774.4 1 10392.8 1 9920.2 1 9884.9 1 10174.5 1 11395.4 1 10760.2 1 10570.1 1 10536.0 1 9902.6 1 8889.0 1 10837.3 1 11624.1 1 10509.0 1 10984.9 1 10649.1 1 10855.7 1 11677.4 1 10760.2 1 10046.2 1 10772.8 1 9987.7 1 8638.7 1 11063.7 1 11855.7 1 10684.5 1 11337.4 1 10478.0 1 11123.9 1 12909.3 1 11339.9 1 10462.2 1 12733.5 1 10519.2 1 10414.9 1 12476.8 1 12384.6 1 12266.7 1 12919.9 1 11497.3 1 12142.0 1 13919.4 1 12656.8 1 120 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 time5 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Invoer[t] = + 7685.635 -1757.34375000000Dummie[t] -120.158503787875M1[t] + 249.857196969693M2[t] + 1508.58198863636M3[t] + 103.397689393936M4[t] -11.0957007575741M5[t] + 727.13818181818M6[t] -843.927935606062M7[t] -1367.89405303030M8[t] + 563.171079545452M9[t] + 686.09587121212M10[t] + 259.502481060605M11[t] + 74.6206628787879t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7685.635252.04635230.492900
Dummie-1757.34375000000235.443694-7.46400
M1-120.158503787875313.207938-0.38360.7019370.350969
M2249.857196969693313.0860220.7980.4264470.213223
M31508.58198863636312.9911664.81994e-062e-06
M4103.397689393936312.9233940.33040.7416650.370832
M5-11.0957007575741312.882724-0.03550.9717710.485885
M6727.13818181818312.8691662.32410.0218310.010916
M7-843.927935606062312.882724-2.69730.0080150.004008
M8-1367.89405303030312.923394-4.37132.7e-051.3e-05
M9563.171079545452312.7471181.80070.0743010.03715
M10686.09587121212312.6792942.19420.0301770.015088
M11259.502481060605312.6385920.830.4081920.204096
t74.62066287878792.91271225.61900


Multiple Linear Regression - Regression Statistics
Multiple R0.95796555587297
R-squared0.917698006239009
Adjusted R-squared0.908630837434832
F-TEST (value)101.211086509854
F-TEST (DF numerator)13
F-TEST (DF denominator)118
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation733.170667831002
Sum Squared Residuals63429628.9237955


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
177877640.09715909086146.902840909142
28474.28084.7335227273389.466477272701
39154.79418.07897727273-263.378977272727
48557.28087.5153409091469.684659090908
57951.18047.64261363636-96.542613636356
69156.78860.4971590909296.202840909097
77865.77364.05170454546501.648295454538
87337.46914.70625422.693749999999
99131.78920.39204545455211.307954545451
108814.69117.9375-303.337499999999
118598.88765.96477272727-167.164772727272
128439.68581.08295454546-141.482954545456
137451.88535.54511363637-1083.74511363637
148016.28980.18147727272-963.981477272725
159544.110313.5269318182-769.426931818182
168270.78982.96329545455-712.263295454546
178102.28943.09056818182-840.89056818182
1893699755.94511363636-386.945113636365
197657.78259.4996590909-601.799659090909
207816.67810.154204545466.4457954545444
219391.39815.84-424.540000000001
229445.410013.3854545455-567.985454545456
239533.19661.41272727273-128.312727272728
2410068.79476.5309090909592.16909090909
258955.59430.99306818182-475.493068181824
2610423.99875.62943181818548.27056818182
2711617.211208.9748863636408.225113636364
289391.19878.41125-487.31125
29108729838.538522727271033.46147727273
3010230.410651.3930681818-420.993068181819
3192219154.9476136363666.052386363637
329428.68705.60215909091722.99784090909
3310934.510711.2879545455223.212045454545
341098610908.833409090977.1665909090907
3511724.610556.86068181821167.73931818182
3611180.910371.9788636364808.921136363635
3711163.210326.4410227273836.758977272721
3811240.910771.0773863636469.822613636365
3912107.112104.42284090912.67715909090909
4010762.310773.8592045455-11.5592045454567
4111340.410733.9864772727606.41352272727
4211266.811546.8410227273-280.041022727275
439542.710050.3955681818-507.695568181817
449227.79601.05011363637-373.350113636365
4510571.99849.3921590909722.507840909091
4610774.410046.9376136364727.462386363636
4710392.89694.96488636364697.835113636363
489920.29510.08306818182410.116931818182
499884.99464.54522727273420.354772727268
5010174.59909.18159090909265.318409090912
5111395.411242.5270454545152.872954545454
5210760.29911.9634090909848.236590909092
5310570.19872.09068181818698.009318181817
541053610684.9452272727-148.945227272727
559902.69188.49977272727714.100227272728
5688898739.15431818182149.845681818182
5710837.310744.840113636492.4598863636357
5811624.110942.3855681818681.714431818183
591050910590.4128409091-81.4128409090913
6010984.910405.5310227273579.368977272726
6110649.110359.9931818182289.106818181814
6210855.710804.629545454551.070454545458
6311677.412137.975-460.575
6410760.210807.4113636364-47.2113636363623
6510046.210767.5386363636-721.338636363636
6610772.811580.3931818182-807.593181818183
679987.710083.9477272727-96.2477272727258
688638.79634.60227272727-995.902272727273
6911063.711640.2880681818-576.588068181817
7011855.711837.833522727317.8664772727284
7110684.511485.8607954545-801.360795454545
7211337.411300.978977272736.4210227272715
731047811255.4411363636-777.44113636364
7411123.911700.0775-576.177499999997
7512909.313033.4229545455-124.122954545455
7611339.911702.8593181818-362.959318181818
7710462.211662.9865909091-1200.78659090909
7812733.512475.8411363636257.658863636363
7910519.210979.3956818182-460.19568181818
8010414.910530.0502272727-115.150227272728
8112476.812535.7360227273-58.936022727273
8212384.612733.2814772727-348.681477272727
8312266.712381.30875-114.608749999999
8412919.912196.4269318182723.473068181817
8511497.312150.8890909091-653.589090909097
861214212595.5254545455-453.525454545451
8713919.413928.8709090909-9.4709090909087
8812656.812598.307272727358.492727272727
8912034.112558.4345454545-524.334545454545
9013199.713371.2890909091-171.58909090909
9110881.311874.8436363636-993.543636363636
9211301.211425.4981818182-124.298181818181
9313643.913431.1839772727212.716022727273
941251713628.7294318182-1111.72943181818
9513981.113276.7567045455704.343295454546
9614275.713091.87488636361183.82511363636
971343513046.3370454545388.66295454545
9813565.713490.973409090974.726590909095
9916216.314824.31886363641391.98113636364
1001297013493.7552272727-523.755227272727
10114079.913453.8825626.017499999999
1021423514266.7370454545-31.7370454545456
10312213.412770.2915909091-556.89159090909
1041258112320.9461363636260.053863636364
10514130.414326.6319318182-196.231931818182
10614210.814524.1773863636-313.377386363637
10714378.514172.2046590909206.295340909091
10813142.813987.3228409091-844.522840909092
10913714.713941.785-227.085000000004
11013621.914386.4213636364-764.521363636361
11115379.815719.7668181818-339.966818181818
11213306.314389.2031818182-1082.90318181818
11314391.214349.330454545541.8695454545459
11414909.915162.185-252.285000000001
11514025.413665.7395454545359.660454545455
11612951.213216.3940909091-265.19409090909
11714344.315222.0798863636-877.779886363636
11816093.415419.6253409091673.774659090909
11915413.615067.6526136364345.947386363637
12014705.714882.7707954545-177.070795454545
12115972.814837.23295454551135.56704545454
12216241.415281.8693181818959.530681818185
12316626.416615.214772727311.1852272727283
12417136.215284.65113636361851.54886363637
12515622.915244.7784090909378.12159090909
12618003.916057.63295454551946.26704545455
12716136.114561.18751574.91250000000
12814423.714111.8420454545311.857954545456
12916789.416117.5278409091671.872159090912
13016782.216315.0732954545467.126704545455
13114133.815963.1005681818-1829.30056818182
1321260715778.21875-3171.21875


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.07183521274615910.1436704254923180.928164787253841
180.0296463137126660.0592926274253320.970353686287334
190.009871260607662770.01974252121532550.990128739392337
200.007508663122770640.01501732624554130.99249133687723
210.002984834058476490.005969668116952990.997015165941524
220.002775078246995060.005550156493990130.997224921753005
230.004692967597590840.009385935195181680.99530703240241
240.02953643676493320.05907287352986650.970463563235067
250.03551367741765750.0710273548353150.964486322582342
260.1085614275777420.2171228551554850.891438572422258
270.172530186774110.345060373548220.82746981322589
280.126441179752490.252882359504980.87355882024751
290.2737089755200450.5474179510400910.726291024479955
300.2207421104502770.4414842209005550.779257889549723
310.1689244245484060.3378488490968120.831075575451594
320.1438153239443580.2876306478887150.856184676055642
330.1098276656286010.2196553312572020.8901723343714
340.08771869281520140.1754373856304030.912281307184799
350.1243526732254460.2487053464508910.875647326774554
360.1039816848678440.2079633697356890.896018315132156
370.1231609603693920.2463219207387840.876839039630608
380.09485981914136410.1897196382827280.905140180858636
390.0691727650435460.1383455300870920.930827234956454
400.04926562279388250.0985312455877650.950734377206117
410.03913461901472940.07826923802945890.96086538098527
420.02945944833093730.05891889666187460.970540551669063
430.02721397021819410.05442794043638820.972786029781806
440.02941070302976770.05882140605953530.970589296970232
450.02179515769267820.04359031538535630.978204842307322
460.01604066654372560.03208133308745110.983959333456274
470.01302772158306870.02605544316613740.986972278416931
480.01142581059281840.02285162118563680.988574189407182
490.007761810501282650.01552362100256530.992238189498717
500.00567939201621540.01135878403243080.994320607983785
510.003711442853139110.007422885706278220.99628855714686
520.003316036748412740.006632073496825490.996683963251587
530.002579344901582540.005158689803165080.997420655098417
540.001864346601041790.003728693202083580.998135653398958
550.001478240168493620.002956480336987240.998521759831506
560.00117713474015270.00235426948030540.998822865259847
570.0008865466621334640.001773093324266930.999113453337866
580.000730336527516210.001460673055032420.999269663472484
590.0007762932857015120.001552586571403020.999223706714298
600.0007137787637579910.001427557527515980.999286221236242
610.0004760662602878880.0009521325205757770.999523933739712
620.0003612418256675800.0007224836513351590.999638758174332
630.0003190782715418540.0006381565430837070.999680921728458
640.0002151057987229020.0004302115974458050.999784894201277
650.0004143946429988260.0008287892859976530.999585605357
660.0004682355291716140.0009364710583432270.999531764470828
670.0003049843642361190.0006099687284722380.999695015635764
680.0006350083273957260.001270016654791450.999364991672604
690.0005804459184075450.001160891836815090.999419554081592
700.0003765082083362710.0007530164166725420.999623491791664
710.000487556613532320.000975113227064640.999512443386468
720.0003889558337359670.0007779116674719350.999611044166264
730.0003653422966292740.0007306845932585480.99963465770337
740.0002785844534468690.0005571689068937390.999721415546553
750.0001659058434649870.0003318116869299740.999834094156535
760.0001017144654963410.0002034289309926820.999898285534504
770.0001920077997567710.0003840155995135420.999807992200243
780.0001441776511633780.0002883553023267560.999855822348837
799.2514316596576e-050.0001850286331931520.999907485683403
805.22264516658392e-050.0001044529033316780.999947773548334
812.92128156154956e-055.84256312309911e-050.999970787184384
821.66590734069114e-053.33181468138228e-050.999983340926593
838.99840859035728e-061.79968171807146e-050.99999100159141
841.61857456299184e-053.23714912598369e-050.99998381425437
851.19739725249743e-052.39479450499486e-050.999988026027475
866.82502201344623e-061.36500440268925e-050.999993174977987
873.83622827857981e-067.67245655715962e-060.999996163771721
882.06686035687334e-064.13372071374669e-060.999997933139643
891.28400714670026e-062.56801429340053e-060.999998715992853
907.42634448826283e-071.48526889765257e-060.99999925736555
911.13189189156568e-062.26378378313135e-060.999998868108108
925.5711994845652e-071.11423989691304e-060.999999442880052
933.11001935029188e-076.22003870058377e-070.999999688998065
946.10544131960679e-071.22108826392136e-060.999999389455868
957.78184927854118e-071.55636985570824e-060.999999221815072
962.07509906811323e-054.15019813622646e-050.999979249009319
971.42367975316513e-052.84735950633026e-050.999985763202468
987.49226022258124e-061.49845204451625e-050.999992507739777
996.64857088297332e-050.0001329714176594660.99993351429117
1004.09027104001686e-058.18054208003372e-050.9999590972896
1013.74097275356951e-057.48194550713901e-050.999962590272464
1022.06411751698468e-054.12823503396935e-050.99997935882483
1032.02496997677372e-054.04993995354744e-050.999979750300232
1041.14580267899242e-052.29160535798484e-050.99998854197321
1055.36175453468417e-061.07235090693683e-050.999994638245465
1062.73237635144951e-065.46475270289902e-060.999997267623649
1073.05313110102756e-066.10626220205512e-060.999996946868899
1089.02665603998595e-061.80533120799719e-050.99999097334396
1094.8855531664012e-069.7711063328024e-060.999995114446834
1104.54351967206340e-069.08703934412681e-060.999995456480328
1111.67666140942857e-063.35332281885715e-060.99999832333859
1122.77348885170652e-055.54697770341304e-050.999972265111483
1131.02907352252244e-052.05814704504488e-050.999989709264775
1147.05600279366534e-050.0001411200558733070.999929439972063
1150.0001408489355475260.0002816978710950510.999859151064453


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level680.686868686868687NOK
5% type I error level760.767676767676768NOK
10% type I error level840.848484848484849NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we/10ysb01260790827.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we/10ysb01260790827.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we/1jruc1260790827.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we/1jruc1260790827.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we/2m7kt1260790827.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we/2m7kt1260790827.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we/3zagz1260790827.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we/3zagz1260790827.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we/4jg9o1260790827.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we/4jg9o1260790827.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we/5hvf91260790827.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we/5hvf91260790827.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we/6k0191260790827.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we/6k0191260790827.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we/7ni4g1260790827.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we/7ni4g1260790827.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we/85s321260790827.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we/85s321260790827.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we/97ye91260790827.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Dec/14/t1260790992bdwhzyucii417we/97ye91260790827.ps (open in new window)


 
Parameters (Session):
par2 = Do not include Seasonal Dummies ; par3 = No 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