Home » date » 2009 » Nov » 19 »

workshop 7 berekening 5

*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: Thu, 19 Nov 2009 11:23:59 -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/19/t1258655090pguan731bdrmkix.htm/, Retrieved Thu, 19 Nov 2009 19:25:02 +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/19/t1258655090pguan731bdrmkix.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 «
5246.24 0 5170.09 4920.10 4926.65 5283.61 0 5246.24 5170.09 4920.10 4979.05 0 5283.61 5246.24 5170.09 4825.20 0 4979.05 5283.61 5246.24 4695.12 0 4825.20 4979.05 5283.61 4711.54 0 4695.12 4825.20 4979.05 4727.22 0 4711.54 4695.12 4825.20 4384.96 0 4727.22 4711.54 4695.12 4378.75 0 4384.96 4727.22 4711.54 4472.93 0 4378.75 4384.96 4727.22 4564.07 0 4472.93 4378.75 4384.96 4310.54 0 4564.07 4472.93 4378.75 4171.38 0 4310.54 4564.07 4472.93 4049.38 0 4171.38 4310.54 4564.07 3591.37 0 4049.38 4171.38 4310.54 3720.46 0 3591.37 4049.38 4171.38 4107.23 0 3720.46 3591.37 4049.38 4101.71 0 4107.23 3720.46 3591.37 4162.34 0 4101.71 4107.23 3720.46 4136.22 0 4162.34 4101.71 4107.23 4125.88 0 4136.22 4162.34 4101.71 4031.48 0 4125.88 4136.22 4162.34 3761.36 0 4031.48 4125.88 4136.22 3408.56 0 3761.36 4031.48 4125.88 3228.47 0 3408.56 3761.36 4031.48 3090.45 0 3228.47 3408.56 3761.36 2741.14 0 3090.45 3228.47 3408.56 2980.44 0 2741.14 3090.45 3228.47 3104.33 0 2980.44 2741.14 3090.45 3181.57 0 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 time8 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = -96.5555117821981 -360.738224795812X[t] + 1.00748531201206Y1[t] + 0.166310440331208Y2[t] -0.188431146174605Y3[t] + 100.779769951900M1[t] + 36.3284441219571M2[t] -83.1206506007616M3[t] + 92.1137994899325M4[t] + 216.725669303820M5[t] + 77.7633337740983M6[t] + 90.034499607901M7[t] + 29.6711390219347M8[t] + 179.016831664903M9[t] + 107.290835612820M10[t] -19.5422145209566M11[t] + 3.32000008834032t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-96.5555117821981127.205611-0.75910.4498740.224937
X-360.738224795812107.986594-3.34060.0012330.000617
Y11.007485312012060.1046139.630600
Y20.1663104403312080.1493161.11380.2684250.134213
Y3-0.1884311461746050.106365-1.77160.0799710.039985
M1100.779769951900126.6373130.79580.4283060.214153
M236.3284441219571126.7031620.28670.7750080.387504
M3-83.1206506007616126.351095-0.65790.5123680.256184
M492.1137994899325127.5150340.72240.4720010.236
M5216.725669303820128.4144821.68770.095050.047525
M677.7633337740983127.4481630.61020.5433490.271674
M790.034499607901126.6731350.71080.4791330.239566
M829.6711390219347126.7956520.2340.8155290.407764
M9179.016831664903130.3069571.37380.1730310.086515
M10107.290835612820131.7904320.81410.4178090.208905
M11-19.5422145209566130.385552-0.14990.8812060.440603
t3.320000088340321.5152482.19110.031120.01556


Multiple Linear Regression - Regression Statistics
Multiple R0.991885608386146
R-squared0.983837060123556
Adjusted R-squared0.980864565433635
F-TEST (value)330.980258252291
F-TEST (DF numerator)16
F-TEST (DF denominator)87
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation259.673901397968
Sum Squared Residuals5866456.55085003


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
15246.245106.26368621096139.976313789040
25283.615164.66253796491118.947462035086
34979.055051.74180723946-72.6918072394601
44825.24915.32252016608-90.122520166081
54695.124830.55959517543-135.439595175435
64711.544595.66529898151115.874701018495
74727.224635.1558434875792.0641565124338
84384.964621.15179360692-236.191793606921
94378.754428.50927173319-49.7592717331867
104472.934293.97078030207178.959219697929
114564.074328.80235319720235.267646802804
124310.544460.32005383141-149.780053831408
134171.384306.40316090229-135.023160902292
144049.384045.731878541573.64812145843335
153591.373831.31876345487-239.948763454874
163720.463554.36707046051166.092929539488
174107.233759.17197434758348.058025652417
184101.714120.96709703489-19.2570970348935
194162.344170.99625638195-8.6562563819518
204136.224101.2391823150434.9808176849629
214125.884238.71290062076-112.832900620756
224031.484144.12089743679-112.640897436791
233761.363928.70340552247-167.343405522471
243408.563665.67236013525-257.112360135249
253228.473387.19543615425-158.725436154250
263090.453136.85077842823-46.4007784282287
272741.142918.1962222011-177.056222201099
282980.442755.80637618127224.633623818730
293104.333092.7428481309111.5871518690903
303181.573187.53684003621-5.96684003621169
312863.863256.45879863122-392.598798631217
322898.012868.8283633658529.1816366341508
333112.332988.50676777422123.823232225784
343254.333201.5709848693452.7590151306578
353513.473250.32957905954263.140420940459
363587.613517.5030567025370.1069432974656
373727.453712.6382525259914.8117474740144
383793.343755.8938816426237.4461183573824
393817.583715.43456101525102.145438984755
403845.133903.01843858982-57.8884385898188
413931.864050.32216569016-118.462165690162
424197.524002.07331300744195.44668699256
434307.134294.5458533315212.5841466684760
444229.434375.77235615421-146.342356154205
454362.284418.32710921413-56.0471092141354
464217.344450.18927780526-232.849277805261
474361.284217.38674869256143.893251307436
484327.744336.12828612198-8.38828612197622
494417.654457.68693390515-40.0369339051536
504557.684454.43778121747103.242218782527
514650.354500.65980715702149.690192842980
524967.184778.92452780723188.255472192767
535123.425215.08394422091-91.6639442209063
545290.855272.0813364224318.7686635775745
555535.665422.6394712896113.020528710403
565514.065610.64346477198-96.5834647719775
575493.885750.7129068573-256.832906857296
585694.835612.2537228909982.5762771090105
595850.415691.90881436587158.501185634134
606116.645908.73821733236207.901782667641
6161756269.07014147252-94.070141472515
626513.586281.69636934747231.883630652532
636383.786466.2215049058-82.4415049057986
646673.666559.31690878226114.343091217743
656936.616893.9125083037542.6974916962457
667300.687095.85686887262204.823131127381
677392.937467.35212197099-74.4221219709918
687497.317514.24995363125-16.9399536312489
697584.717718.81697396314-134.106973963144
707160.797738.44190479642-577.651904796418
717196.197182.7027707300713.4872292699298
727245.637154.2587613437391.3712386562724
737347.517393.93572628391-46.4257262839081
747425.757436.99892972549-11.2489297254887
757778.517407.323157697371.186842302995
767822.337935.09289022066-112.762890220661
778181.228151.0975845497930.1224154502077
788371.478317.8484051071853.6215948928178
798347.718576.54375274472-228.833752744716
808672.118459.57704845609212.532951543911
818802.798899.27041478213-96.480414782126
829138.469020.95083026867117.509169731327
839123.299196.22675942976-72.9367594297645
849023.218874.26844038391148.941559616092
858850.418811.7654681817338.6445318182745
868864.588562.75483214356301.825167856441
879163.748451.02154940031712.718450599686
888516.668965.89282651934-449.232826519343
898553.448488.98446271364.4555372870072
907555.28226.4102156283-671.210215628304
917851.227364.33616774957486.883832250433
9274427432.580377801239.41962219877333
937992.537410.29365505514582.23634494486
948264.047772.70160163046491.338398369546
957517.398091.39956900253-574.009569002527
967200.47303.44082414884-103.040824148837
977193.696912.84119436321280.848805636791
986193.586932.92301098868-739.343010988684
995104.215867.81262692919-763.602626929185
1004800.464783.7784412728316.6815587271750
1014461.614612.96491686846-151.354916868464
1024398.594290.69062490942107.899375090581
1034243.634243.67173441287-0.0417344128685802
1044293.824083.87745989745209.942540102554


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
200.4564877642622630.9129755285245260.543512235737737
210.2914223529964070.5828447059928130.708577647003593
220.1733209695493340.3466419390986680.826679030450666
230.1080757960792910.2161515921585810.89192420392071
240.0625615029996620.1251230059993240.937438497000338
250.03223092471063320.06446184942126640.967769075289367
260.01807591019602110.03615182039204230.981924089803979
270.009258549585768180.01851709917153640.990741450414232
280.004791425641655890.009582851283311780.995208574358344
290.003362215133602330.006724430267204650.996637784866398
300.001451672908383170.002903345816766350.998548327091617
310.004850688893057740.009701377786115470.995149311106942
320.003772563910587990.007545127821175970.996227436089412
330.002360927203215940.004721854406431880.997639072796784
340.001153583648382790.002307167296765580.998846416351617
350.001837166956983270.003674333913966550.998162833043017
360.002661772005965480.005323544011930960.997338227994035
370.0020276181427550.004055236285510.997972381857245
380.001127329879020230.002254659758040450.99887267012098
390.001388259501634860.002776519003269720.998611740498365
400.001037222740214540.002074445480429070.998962777259785
410.000539898461966850.00107979692393370.999460101538033
420.0005168591122040570.001033718224408110.999483140887796
430.0002689024825672040.0005378049651344070.999731097517433
440.0001533232769094600.0003066465538189210.99984667672309
457.55477790420018e-050.0001510955580840040.999924452220958
466.92759054298304e-050.0001385518108596610.99993072409457
474.54979766963736e-059.09959533927471e-050.999954502023304
482.36515345451589e-054.73030690903178e-050.999976348465455
491.14716920525279e-052.29433841050558e-050.999988528307947
505.48205944314602e-061.09641188862920e-050.999994517940557
514.31587220125221e-068.63174440250441e-060.9999956841278
522.14771625802605e-064.29543251605209e-060.999997852283742
531.10077700015232e-062.20155400030465e-060.999998899223
544.50160445991516e-079.00320891983031e-070.999999549839554
552.5823181397344e-075.1646362794688e-070.999999741768186
561.37922311723677e-072.75844623447354e-070.999999862077688
571.54505632811504e-073.09011265623009e-070.999999845494367
589.16343385747625e-081.83268677149525e-070.999999908365661
593.97702632624459e-087.95405265248919e-080.999999960229737
604.6070535911162e-089.2141071822324e-080.999999953929464
612.71130369707650e-085.42260739415299e-080.999999972886963
622.19039894187291e-084.38079788374581e-080.99999997809601
631.19248270250692e-082.38496540501385e-080.999999988075173
645.02990076142499e-091.00598015228500e-080.9999999949701
651.76251584175015e-093.52503168350029e-090.999999998237484
661.06802449132289e-092.13604898264578e-090.999999998931975
674.49446103846945e-108.9889220769389e-100.999999999550554
681.76704459993446e-103.53408919986893e-100.999999999823296
691.47227990370749e-102.94455980741498e-100.999999999852772
702.54015830053602e-075.08031660107205e-070.99999974598417
711.83538436984950e-073.67076873969901e-070.999999816461563
721.18684498997847e-072.37368997995694e-070.9999998813155
733.38572684866247e-076.77145369732495e-070.999999661427315
743.86943844592037e-077.73887689184075e-070.999999613056155
759.30987004694379e-071.86197400938876e-060.999999069012995
769.02001882648798e-071.80400376529760e-060.999999097998117
774.26422991027671e-078.52845982055343e-070.99999957357701
782.00195270349507e-074.00390540699014e-070.99999979980473
791.16391849366838e-072.32783698733677e-070.99999988360815
807.98080095064588e-081.59616019012918e-070.99999992019199
815.72677547212754e-081.14535509442551e-070.999999942732245
821.14939752107190e-072.29879504214381e-070.999999885060248
833.78977711450038e-087.57955422900076e-080.999999962102229
842.55721635218840e-085.11443270437679e-080.999999974427837


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level570.876923076923077NOK
5% type I error level590.907692307692308NOK
10% type I error level600.923076923076923NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258655090pguan731bdrmkix/10wdqt1258655030.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258655090pguan731bdrmkix/10wdqt1258655030.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258655090pguan731bdrmkix/15szk1258655030.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258655090pguan731bdrmkix/15szk1258655030.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258655090pguan731bdrmkix/2b4ex1258655030.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258655090pguan731bdrmkix/2b4ex1258655030.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258655090pguan731bdrmkix/3dd1j1258655030.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258655090pguan731bdrmkix/3dd1j1258655030.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258655090pguan731bdrmkix/4lh3s1258655030.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258655090pguan731bdrmkix/4lh3s1258655030.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258655090pguan731bdrmkix/5p6ta1258655030.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258655090pguan731bdrmkix/5p6ta1258655030.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258655090pguan731bdrmkix/61m5y1258655030.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258655090pguan731bdrmkix/61m5y1258655030.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258655090pguan731bdrmkix/75sme1258655030.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258655090pguan731bdrmkix/75sme1258655030.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258655090pguan731bdrmkix/88p6h1258655030.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258655090pguan731bdrmkix/88p6h1258655030.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/19/t1258655090pguan731bdrmkix/9px651258655030.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/19/t1258655090pguan731bdrmkix/9px651258655030.ps (open in new window)


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





Copyright

Creative Commons License

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

Software written by Ed van Stee & Patrick Wessa


Disclaimer

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


Privacy Policy

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

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

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

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

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

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

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

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

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


FreeStatistics.org is powered by