Home » date » 2009 » Nov » 27 »

Verbetering Workshop 7 (seasonal dummies)

*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: Fri, 27 Nov 2009 06:26:49 -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/Nov/27/t1259328573z75fflusrlq2cj1.htm/, Retrieved Fri, 27 Nov 2009 14:29:46 +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/Nov/27/t1259328573z75fflusrlq2cj1.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 «
384 257.9 367.6 275.8 457.1 319.4 429.4 299.8 442.2 331.1 507.5 339.3 348.5 209.6 393.2 280.9 426.8 285.5 403 247.6 454.8 275.1 413 262.3 388.9 267.8 406.5 448.2 447.4 563.4 474.4 346.6 428.5 455.1 472.8 424.4 411 381.2 463.9 382.9 497.3 466.6 474 400.2 518.1 493.6 566 367.5 509.4 307.1 445.1 316.7 466.6 314.2 600.5 403.7 538.7 370.6 548 343.7 591.9 383 547.3 365.4 610.2 417.2 621.6 411 582.4 420.8 635.8 493 663.9 471.8 624.2 452.4 654.1 464.8 723.5 541.5 641.2 484 565.5 449.4 698.6 436.8 651 490 721.6 475.4 643.5 393.6 604 486.8 618.2 536.7 783.5 467 672.9 475.5 726.7 532.8 738.6 554.1 692.2 507.3 669.5 455.2 546.2 465.3 715 563.2 789.8 680.1 684 518.2 639 426.6 768.5 612.4 643.8 518.1 623 540 692.8 541.7 936.5 627.6 795.9 637 695.7 564.2 648.3 665 675.2 703.2 826.5 824.4 742.4 700.3 793.9 1219.6 685.3 764.7 756.1 479.9 704 543.4 860.6 593.3 795.9 584.3 816.7 645.9 777.9 548.9 746.4 421.8 694.7 460.3 909.2 553.4 783.6 424.4 730 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
yt[t] = + 169.803669378881 + 0.982878385352796xt[t] + 53.0505660825984M1[t] -0.269148200396778M2[t] + 11.6519447450388M3[t] + 65.945969813359M4[t] -11.0060367652886M5[t] + 7.85788440982509M6[t] + 30.8704282258714M7[t] -12.3135781387198M8[t] + 44.8369121538511M9[t] + 68.197242675119M10[t] -10.0188622503012M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)169.80366937888152.2932143.24710.0015570.000779
xt0.9828783853527960.05743717.112200
M153.050566082598454.2013790.97880.3299030.164951
M2-0.26914820039677854.063772-0.0050.9960370.498019
M311.651944745038853.6982710.2170.828630.414315
M465.94596981335953.6313331.22960.2215380.110769
M5-11.006036765288653.445423-0.20590.8372370.418618
M67.8578844098250953.9385980.14570.8844460.442223
M730.870428225871453.8116820.57370.5673910.283696
M8-12.313578138719853.529792-0.230.8185060.409253
M944.836912153851153.3092050.84110.4021830.201091
M1068.19724267511953.654661.2710.2064710.103235
M11-10.018862250301253.32958-0.18790.8513370.425668


Multiple Linear Regression - Regression Statistics
Multiple R0.863673532333926
R-squared0.745931970454162
Adjusted R-squared0.717438359663974
F-TEST (value)26.1789204585837
F-TEST (DF numerator)12
F-TEST (DF denominator)107
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation119.105356593924
Sum Squared Residuals1517911.19872213


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
1384476.338571043963-92.3385710439632
2367.6440.612379858785-73.0123798587849
3457.1495.386970405603-38.2869704056027
4429.4530.416579121008-101.016579121008
5442.2484.228666003903-42.0286660039031
6507.5511.15218993891-3.6521899389097
7348.5406.685407174698-58.1854071746983
8393.2433.580629685761-40.3806296857615
9426.8495.252360550955-68.4523605509554
10403481.361600267352-78.3616002673522
11454.8430.17465093913424.6253490608661
12413427.612669856919-14.6126698569194
13388.9486.069067058958-97.1690670589582
14406.5610.060613493607-203.560613493607
15447.4735.209296431685-287.809296431685
16474.4576.415287555519-102.015287555519
17428.5606.10558578765-177.605585787650
18472.8594.795140532433-121.995140532433
19411575.347338101238-164.347338101238
20463.9533.834224991747-69.9342249917467
21497.3673.251636138347-175.951636138347
22474631.348841872189-157.348841872189
23518.1644.93357813872-126.83357813872
24566531.01147599603334.9885240039665
25509.4524.696187603323-15.2961876033231
26445.1480.812105819715-35.7121058197146
27466.6490.276002801768-23.6760028017682
28600.5632.537643359164-32.0376433591637
29538.7523.05236222533915.6476377746615
30548515.47685483446232.5231451655380
31591.9577.11651919487314.7834808051268
32547.3516.63385324807330.6661467519272
33610.2624.697443901919-14.4974439019185
34621.6641.963928433999-20.3639284339991
35582.4573.3800316850369.01996831496368
36635.8654.36271335781-18.5627133578095
37663.9686.576257670929-22.6762576709286
38624.2614.18870271208910.0112972879109
39654.1638.297487635915.8025123641007
40723.5767.978284860779-44.4782848607790
41641.2634.5107711243466.68922887565443
42565.5619.367100166253-53.8671001662526
43698.6629.99537632685468.6046236731464
44651639.10050006303111.8994999369688
45721.6681.90096592945139.6990340705487
46643.5624.8618445288618.6381554711394
47604638.250005118321-34.2500051183209
48618.2697.314498797727-79.1144987977266
49783.5681.858441421235101.641558578765
50672.9636.89319341373936.0068065862613
51726.7705.1332178398921.5667821601106
52738.6780.362552516224-41.7625525162243
53692.2657.41183750306634.7881624969343
54669.5625.06779480129944.4322051987012
55546.2658.007410309408-111.807410309408
56715711.0471978708563.95280212914403
57789.8883.096171411169-93.2961714111688
58684747.328491343819-63.328491343819
59639579.08072632008259.9192736799175
60768.5771.718392568933-3.21839256893334
61643.8732.083526912763-88.2835269127631
62623700.288849268994-77.288849268994
63692.8713.88083546953-21.0808354695295
64936.5852.60411383965583.8958861603452
65795.9784.89116408332311.0088359166765
66695.7732.201538804754-36.5015388047536
67648.3854.288223864362-205.988223864362
68675.2848.650171820247-173.450171820247
69826.51024.92552241758-198.425522417577
70742.4926.310645316563-183.910645316563
71793.91358.50328590485-564.60328590485
72685.3921.410770658164-236.110770658164
73756.1694.53757259228661.5624274077138
74704703.6306357791940.36936422080643
75860.6764.59736015373496.0026398462664
76795.9810.045479753879-14.1454797538787
77816.7793.63878171296323.0612182870367
78777.9717.16349950885660.7365004911442
79746.4615.252200546562131.147799453438
80694.7609.90901201805384.7909879819469
81909.2758.565479986969150.634520013031
82783.6655.134498797727128.465501202273
83730.4621.934223921464108.465776078536
84847.7707.634721843931140.065278156069
85758.7660.03854126640398.661458733597
86839.2687.216566743802151.983433256198
87784.8769.51175208049815.2882479195023
88906.1769.944041631485136.155958368515
89838.2789.01925330180549.1807466981948
90729693.67270609892435.327293901076
91768.1713.24517556623654.8548244337645
92710.5699.84238427783410.657615722166
93863749.031559649047113.968440350953
94778.3702.01779777905576.2822022209449
95827.7639.429459180744188.270540819256
96853.1801.59789548365851.5021045163417
97859.3814.25215992825745.0478400717431
98779.2713.95085882539865.2491411746021
99724.6695.00957047075629.5904295292443
100829.2794.4177134267734.7822865732308
101862.9822.6336940808740.2663059191292
102601.6668.216155918287-66.6161559182866
103964.9740.667482517578224.232517482422
104766.3679.59508953956786.7049104604335
105847.8787.95354370901859.846456290982
106992.7755.486381942247237.213618057753
107865.3664.197994491635201.102005508365
1081054.1886.420300139605167.679699860395
109972.5963.6496745018828.8503254981181
110857.4731.446094084678125.953905915322
1111043.3850.697506710639192.602493289361
1121061980.37830393551880.6216960644816
113989.4950.40788417673438.9921158232656
114963.2853.587019395824109.612980604176
1151181.91135.1948663981946.7051336018092
1161256.41201.3069364848355.0930635151694
1171492.71306.22531630555186.474683694453
1181360.81318.0859697181942.7140302818122
1191342.81208.51604430001134.283955699987
12014641506.61656129722-42.616561297219


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
160.00988608228153440.01977216456306880.990113917718466
170.002112279073969220.004224558147938440.99788772092603
180.0007374829890506580.001474965978101320.99926251701095
190.000491236525486270.000982473050972540.999508763474514
200.0003432214211225990.0006864428422451980.999656778578877
210.0001540195843616690.0003080391687233390.999845980415638
226.83904242630176e-050.0001367808485260350.999931609575737
231.89754909607471e-053.79509819214942e-050.99998102450904
240.0001673667704400080.0003347335408800160.99983263322956
250.0004754340286390920.0009508680572781850.999524565971361
260.0003769725536557110.0007539451073114210.999623027446344
270.0002057149820511490.0004114299641022970.999794285017949
280.0005646664849009260.001129332969801850.999435333515099
290.0007776014247716320.001555202849543260.999222398575228
300.0005238651050223420.001047730210044680.999476134894978
310.002814622493637180.005629244987274360.997185377506363
320.002770999594696960.005541999189393920.997229000405303
330.003787555380869660.007575110761739320.99621244461913
340.005732740881729830.01146548176345970.99426725911827
350.00428910778201560.00857821556403120.995710892217984
360.002914008485307880.005828016970615770.997085991514692
370.003760552671652710.007521105343305430.996239447328347
380.005757451435598920.01151490287119780.9942425485644
390.008191245103784890.01638249020756980.991808754896215
400.006940635609777140.01388127121955430.993059364390223
410.005975985457483170.01195197091496630.994024014542517
420.003864547085142440.007729094170284880.996135452914858
430.005459255029741950.01091851005948390.994540744970258
440.003809114809986020.007618229619972040.996190885190014
450.004228174513019520.008456349026039050.99577182548698
460.003802193028267860.007604386056535710.996197806971732
470.00249859318439850.0049971863687970.997501406815602
480.001976640236152770.003953280472305540.998023359763847
490.00315086300152240.00630172600304480.996849136998478
500.002933855727621850.005867711455243690.997066144272378
510.002592779138633880.005185558277267750.997407220861366
520.001839924365741450.00367984873148290.998160075634259
530.001385754138229380.002771508276458760.99861424586177
540.001004279163753230.002008558327506450.998995720836247
550.001036439020554730.002072878041109450.998963560979445
560.0006279257288897270.001255851457779450.99937207427111
570.0005100488371771010.001020097674354200.999489951162823
580.0003824774234321740.0007649548468643470.999617522576568
590.0002919552528860690.0005839105057721390.999708044747114
600.0001768322611054870.0003536645222109750.999823167738894
610.000149270292894830.000298540585789660.999850729707105
620.0001177815096770190.0002355630193540380.999882218490323
638.34090482877503e-050.0001668180965755010.999916590951712
649.98152092942444e-050.0001996304185884890.999900184790706
655.88863083112e-050.00011777261662240.999941113691689
663.45783451538429e-056.91566903076857e-050.999965421654846
670.0001596214451888680.0003192428903777360.999840378554811
680.0003464691065070810.0006929382130141620.999653530893493
690.0009815887233030470.001963177446606090.999018411276697
700.002577459920338960.005154919840677920.99742254007966
710.8121354729411990.3757290541176020.187864527058801
720.986150788455110.02769842308977960.0138492115448898
730.9834558190955420.03308836180891580.0165441809044579
740.987115023771970.02576995245605830.0128849762280291
750.9878713080891680.02425738382166420.0121286919108321
760.9885724750925640.02285504981487230.0114275249074362
770.98491266082950.03017467834100040.0150873391705002
780.981230124698510.03753975060298030.0187698753014901
790.9814131448935630.03717371021287460.0185868551064373
800.9758218554282420.04835628914351530.0241781445717577
810.9782544853870480.04349102922590390.0217455146129520
820.9761907066553590.0476185866892830.0238092933446415
830.9784644602409080.0430710795181840.021535539759092
840.9776010857862820.04479782842743510.0223989142137175
850.9722910151446320.05541796971073680.0277089848553684
860.9715955344595860.05680893108082740.0284044655404137
870.9687552980879120.06248940382417620.0312447019120881
880.966066513041950.06786697391610240.0339334869580512
890.9507132772577940.09857344548441280.0492867227422064
900.9276717186009970.1446565627980070.0723282813990033
910.9222862515867650.1554274968264690.0777137484132347
920.9044963142355180.1910073715289650.0955036857644824
930.8779148999498070.2441702001003860.122085100050193
940.8683151382252120.2633697235495760.131684861774788
950.841100374274980.3177992514500410.158899625725021
960.7965358966146860.4069282067706290.203464103385314
970.7253290365220730.5493419269558540.274670963477927
980.6570007706365650.685998458726870.342999229363435
990.706756598642550.58648680271490.29324340135745
1000.6283757613368330.7432484773263340.371624238663167
1010.5131754645430440.9736490709139130.486824535456956
1020.6224176259678720.7551647480642560.377582374032128
1030.591957352391690.8160852952166210.408042647608310
1040.4423953656076590.8847907312153180.557604634392341


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level480.539325842696629NOK
5% type I error level680.764044943820225NOK
10% type I error level730.820224719101124NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328573z75fflusrlq2cj1/100lb71259328404.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328573z75fflusrlq2cj1/100lb71259328404.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328573z75fflusrlq2cj1/1nazs1259328404.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328573z75fflusrlq2cj1/1nazs1259328404.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328573z75fflusrlq2cj1/2k9b11259328404.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328573z75fflusrlq2cj1/2k9b11259328404.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328573z75fflusrlq2cj1/3r63c1259328404.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328573z75fflusrlq2cj1/3r63c1259328404.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328573z75fflusrlq2cj1/4zcsq1259328404.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328573z75fflusrlq2cj1/4zcsq1259328404.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328573z75fflusrlq2cj1/5xhbm1259328404.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328573z75fflusrlq2cj1/5xhbm1259328404.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328573z75fflusrlq2cj1/6n8qw1259328404.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328573z75fflusrlq2cj1/6n8qw1259328404.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328573z75fflusrlq2cj1/7jhax1259328404.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328573z75fflusrlq2cj1/7jhax1259328404.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328573z75fflusrlq2cj1/8apy61259328404.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328573z75fflusrlq2cj1/8apy61259328404.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328573z75fflusrlq2cj1/95d711259328404.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/27/t1259328573z75fflusrlq2cj1/95d711259328404.ps (open in new window)


 
Parameters (Session):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = No Linear Trend ;
 
Parameters (R input):
par1 = 1 ; par2 = Include Monthly Dummies ; par3 = No Linear Trend ;
 
R code (references can be found in the software module):
library(lattice)
library(lmtest)
n25 <- 25 #minimum number of obs. for Goldfeld-Quandt test
par1 <- as.numeric(par1)
x <- t(y)
k <- length(x[1,])
n <- length(x[,1])
x1 <- cbind(x[,par1], x[,1:k!=par1])
mycolnames <- c(colnames(x)[par1], colnames(x)[1:k!=par1])
colnames(x1) <- mycolnames #colnames(x)[par1]
x <- x1
if (par3 == 'First Differences'){
x2 <- array(0, dim=c(n-1,k), dimnames=list(1:(n-1), paste('(1-B)',colnames(x),sep='')))
for (i in 1:n-1) {
for (j in 1:k) {
x2[i,j] <- x[i+1,j] - x[i,j]
}
}
x <- x2
}
if (par2 == 'Include Monthly Dummies'){
x2 <- array(0, dim=c(n,11), dimnames=list(1:n, paste('M', seq(1:11), sep ='')))
for (i in 1:11){
x2[seq(i,n,12),i] <- 1
}
x <- cbind(x, x2)
}
if (par2 == 'Include Quarterly Dummies'){
x2 <- array(0, dim=c(n,3), dimnames=list(1:n, paste('Q', seq(1:3), sep ='')))
for (i in 1:3){
x2[seq(i,n,4),i] <- 1
}
x <- cbind(x, x2)
}
k <- length(x[1,])
if (par3 == 'Linear Trend'){
x <- cbind(x, c(1:n))
colnames(x)[k+1] <- 't'
}
x
k <- length(x[1,])
df <- as.data.frame(x)
(mylm <- lm(df))
(mysum <- summary(mylm))
if (n > n25) {
kp3 <- k + 3
nmkm3 <- n - k - 3
gqarr <- array(NA, dim=c(nmkm3-kp3+1,3))
numgqtests <- 0
numsignificant1 <- 0
numsignificant5 <- 0
numsignificant10 <- 0
for (mypoint in kp3:nmkm3) {
j <- 0
numgqtests <- numgqtests + 1
for (myalt in c('greater', 'two.sided', 'less')) {
j <- j + 1
gqarr[mypoint-kp3+1,j] <- gqtest(mylm, point=mypoint, alternative=myalt)$p.value
}
if (gqarr[mypoint-kp3+1,2] < 0.01) numsignificant1 <- numsignificant1 + 1
if (gqarr[mypoint-kp3+1,2] < 0.05) numsignificant5 <- numsignificant5 + 1
if (gqarr[mypoint-kp3+1,2] < 0.10) numsignificant10 <- numsignificant10 + 1
}
gqarr
}
bitmap(file='test0.png')
plot(x[,1], type='l', main='Actuals and Interpolation', ylab='value of Actuals and Interpolation (dots)', xlab='time or index')
points(x[,1]-mysum$resid)
grid()
dev.off()
bitmap(file='test1.png')
plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
grid()
dev.off()
bitmap(file='test2.png')
hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
grid()
dev.off()
bitmap(file='test3.png')
densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
dev.off()
bitmap(file='test4.png')
qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
qqline(mysum$resid)
grid()
dev.off()
(myerror <- as.ts(mysum$resid))
bitmap(file='test5.png')
dum <- cbind(lag(myerror,k=1),myerror)
dum
dum1 <- dum[2:length(myerror),]
dum1
z <- as.data.frame(dum1)
z
plot(z,main=paste('Residual Lag plot, lowess, and regression line'), ylab='values of Residuals', xlab='lagged values of Residuals')
lines(lowess(z))
abline(lm(z))
grid()
dev.off()
bitmap(file='test6.png')
acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
grid()
dev.off()
bitmap(file='test7.png')
pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
grid()
dev.off()
bitmap(file='test8.png')
opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
plot(mylm, las = 1, sub='Residual Diagnostics')
par(opar)
dev.off()
if (n > n25) {
bitmap(file='test9.png')
plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
grid()
dev.off()
}
load(file='createtable')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Estimated Regression Equation', 1, TRUE)
a<-table.row.end(a)
myeq <- colnames(x)[1]
myeq <- paste(myeq, '[t] = ', sep='')
for (i in 1:k){
if (mysum$coefficients[i,1] > 0) myeq <- paste(myeq, '+', '')
myeq <- paste(myeq, mysum$coefficients[i,1], sep=' ')
if (rownames(mysum$coefficients)[i] != '(Intercept)') {
myeq <- paste(myeq, rownames(mysum$coefficients)[i], sep='')
if (rownames(mysum$coefficients)[i] != 't') myeq <- paste(myeq, '[t]', sep='')
}
}
myeq <- paste(myeq, ' + e[t]')
a<-table.row.start(a)
a<-table.element(a, myeq)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable1.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,hyperlink('http://www.xycoon.com/ols1.htm','Multiple Linear Regression - Ordinary Least Squares',''), 6, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Variable',header=TRUE)
a<-table.element(a,'Parameter',header=TRUE)
a<-table.element(a,'S.D.',header=TRUE)
a<-table.element(a,'T-STAT<br />H0: parameter = 0',header=TRUE)
a<-table.element(a,'2-tail p-value',header=TRUE)
a<-table.element(a,'1-tail p-value',header=TRUE)
a<-table.row.end(a)
for (i in 1:k){
a<-table.row.start(a)
a<-table.element(a,rownames(mysum$coefficients)[i],header=TRUE)
a<-table.element(a,mysum$coefficients[i,1])
a<-table.element(a, round(mysum$coefficients[i,2],6))
a<-table.element(a, round(mysum$coefficients[i,3],4))
a<-table.element(a, round(mysum$coefficients[i,4],6))
a<-table.element(a, round(mysum$coefficients[i,4]/2,6))
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable2.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Regression Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple R',1,TRUE)
a<-table.element(a, sqrt(mysum$r.squared))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'R-squared',1,TRUE)
a<-table.element(a, mysum$r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Adjusted R-squared',1,TRUE)
a<-table.element(a, mysum$adj.r.squared)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (value)',1,TRUE)
a<-table.element(a, mysum$fstatistic[1])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF numerator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[2])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'F-TEST (DF denominator)',1,TRUE)
a<-table.element(a, mysum$fstatistic[3])
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'p-value',1,TRUE)
a<-table.element(a, 1-pf(mysum$fstatistic[1],mysum$fstatistic[2],mysum$fstatistic[3]))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Residual Statistics', 2, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Residual Standard Deviation',1,TRUE)
a<-table.element(a, mysum$sigma)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Sum Squared Residuals',1,TRUE)
a<-table.element(a, sum(myerror*myerror))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable3.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, 'Multiple Linear Regression - Actuals, Interpolation, and Residuals', 4, TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a, 'Time or Index', 1, TRUE)
a<-table.element(a, 'Actuals', 1, TRUE)
a<-table.element(a, 'Interpolation<br />Forecast', 1, TRUE)
a<-table.element(a, 'Residuals<br />Prediction Error', 1, TRUE)
a<-table.row.end(a)
for (i in 1:n) {
a<-table.row.start(a)
a<-table.element(a,i, 1, TRUE)
a<-table.element(a,x[i])
a<-table.element(a,x[i]-mysum$resid[i])
a<-table.element(a,mysum$resid[i])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable4.tab')
if (n > n25) {
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'p-values',header=TRUE)
a<-table.element(a,'Alternative Hypothesis',3,header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'breakpoint index',header=TRUE)
a<-table.element(a,'greater',header=TRUE)
a<-table.element(a,'2-sided',header=TRUE)
a<-table.element(a,'less',header=TRUE)
a<-table.row.end(a)
for (mypoint in kp3:nmkm3) {
a<-table.row.start(a)
a<-table.element(a,mypoint,header=TRUE)
a<-table.element(a,gqarr[mypoint-kp3+1,1])
a<-table.element(a,gqarr[mypoint-kp3+1,2])
a<-table.element(a,gqarr[mypoint-kp3+1,3])
a<-table.row.end(a)
}
a<-table.end(a)
table.save(a,file='mytable5.tab')
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity',4,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Description',header=TRUE)
a<-table.element(a,'# significant tests',header=TRUE)
a<-table.element(a,'% significant tests',header=TRUE)
a<-table.element(a,'OK/NOK',header=TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'1% type I error level',header=TRUE)
a<-table.element(a,numsignificant1)
a<-table.element(a,numsignificant1/numgqtests)
if (numsignificant1/numgqtests < 0.01) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'5% type I error level',header=TRUE)
a<-table.element(a,numsignificant5)
a<-table.element(a,numsignificant5/numgqtests)
if (numsignificant5/numgqtests < 0.05) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'10% type I error level',header=TRUE)
a<-table.element(a,numsignificant10)
a<-table.element(a,numsignificant10/numgqtests)
if (numsignificant10/numgqtests < 0.1) dum <- 'OK' else dum <- 'NOK'
a<-table.element(a,dum)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file='mytable6.tab')
}
 





Copyright

Creative Commons License

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.

Software written by Ed van Stee & Patrick Wessa


Disclaimer

Information provided on this web site is provided "AS IS" without warranty of any kind, either express or implied, including, without limitation, warranties of merchantability, fitness for a particular purpose, and noninfringement. We use reasonable efforts to include accurate and timely information and periodically update the information, and software without notice. However, we make no warranties or representations as to the accuracy or completeness of such information (or software), and we assume no liability or responsibility for errors or omissions in the content of this web site, or any software bugs in online applications. Your use of this web site is AT YOUR OWN RISK. Under no circumstances and under no legal theory shall we be liable to you or any other person for any direct, indirect, special, incidental, exemplary, or consequential damages arising from your access to, or use of, this web site.


Privacy Policy

We may request personal information to be submitted to our servers in order to be able to:

  • personalize online software applications according to your needs
  • enforce strict security rules with respect to the data that you upload (e.g. statistical data)
  • manage user sessions of online applications
  • alert you about important changes or upgrades in resources or applications

We NEVER allow other companies to directly offer registered users information about their products and services. Banner references and hyperlinks of third parties NEVER contain any personal data of the visitor.

We do NOT sell, nor transmit by any means, personal information, nor statistical data series uploaded by you to third parties.

We carefully protect your data from loss, misuse, alteration, and destruction. However, at any time, and under any circumstance you are solely responsible for managing your passwords, and keeping them secret.

We store a unique ANONYMOUS USER ID in the form of a small 'Cookie' on your computer. This allows us to track your progress when using this website which is necessary to create state-dependent features. The cookie is used for NO OTHER PURPOSE. At any time you may opt to disallow cookies from this website - this will not affect other features of this website.

We examine cookies that are used by third-parties (banner and online ads) very closely: abuse from third-parties automatically results in termination of the advertising contract without refund. We have very good reason to believe that the cookies that are produced by third parties (banner ads) do NOT cause any privacy or security risk.

FreeStatistics.org is safe. There is no need to download any software to use the applications and services contained in this website. Hence, your system's security is not compromised by their use, and your personal data - other than data you submit in the account application form, and the user-agent information that is transmitted by your browser - is never transmitted to our servers.

As a general rule, we do not log on-line behavior of individuals (other than normal logging of webserver 'hits'). However, in cases of abuse, hacking, unauthorized access, Denial of Service attacks, illegal copying, hotlinking, non-compliance with international webstandards (such as robots.txt), or any other harmful behavior, our system engineers are empowered to log, track, identify, publish, and ban misbehaving individuals - even if this leads to ban entire blocks of IP addresses, or disclosing user's identity.


FreeStatistics.org is powered by