Home » date » 2009 » Nov » 21 »

WS 7 Multiple Regression analysis

*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: Sat, 21 Nov 2009 02:10:54 -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/21/t1258794747k1nj31fu7vu162i.htm/, Retrieved Sat, 21 Nov 2009 10:12:39 +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/21/t1258794747k1nj31fu7vu162i.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:
WS 7 Multiple Regression analysis
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
14.5 14.8 14.3 14.7 15.3 16 14.4 15.4 13.7 15 14.2 15.5 13.5 15.1 11.9 11.7 14.6 16.3 15.6 16.7 14.1 15 14.9 14.9 14.2 14.6 14.6 15.3 17.2 17.9 15.4 16.4 14.3 15.4 17.5 17.9 14.5 15.9 14.4 13.9 16.6 17.8 16.7 17.9 16.6 17.4 16.9 16.7 15.7 16 16.4 16.6 18.4 19.1 16.9 17.8 16.5 17.2 18.3 18.6 15.1 16.3 15.7 15.1 18.1 19.2 16.8 17.7 18.9 19.1 19 18 18.1 17.5 17.8 17.8 21.5 21.1 17.1 17.2 18.7 19.4 19 19.8 16.4 17.6 16.9 16.2 18.6 19.5 19.3 19.9 19.4 20 17.6 17.3 18.6 18.9 18.1 18.6 20.4 21.4 18.1 18.6 19.6 19.8 19.9 20.8 19.2 19.6 17.8 17.7 19.2 19.8 22 22.2 21.1 20.7 19.5 17.9 22.2 20.9 20.9 21.2 22.2 21.4 23.5 23 21.5 21.3 24.3 23.9 22.8 22.4 20.3 18.3 23.7 22.8 23.3 22.3 19.6 17.8 18 16.4 17.3 16 16.8 16.4 18.2 17.7 16.5 16.6 16 16.2 18.4 18.3
 
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 time4 seconds
R Server'Gwilym Jenkins' @ 72.249.127.135


Multiple Linear Regression - Estimated Regression Equation
Y[t] = -2.29101830970334 + 1.18227381282826X[t] -0.528396202113022M1[t] -1.09215623702356M2[t] -1.41384671982294M3[t] -1.40672834794418M4[t] -1.51707239523279M5[t] -1.67619740018946M6[t] -1.85649345552018M7[t] + 0.152145441079096M8[t] -1.98138135702689M9[t] -1.75420734980634M10[t] -1.10066825881478M11[t] + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)-2.291018309703340.577156-3.96950.0001839.1e-05
X1.182273812828260.03116637.935300
M1-0.5283962021130220.324777-1.6270.1085860.054293
M2-1.092156237023560.324961-3.36090.0013050.000652
M3-1.413846719822940.333002-4.24587.1e-053.5e-05
M4-1.406728347944180.326229-4.31215.6e-052.8e-05
M5-1.517072395232790.325948-4.65431.6e-058e-06
M6-1.676197400189460.3332-5.03064e-062e-06
M7-1.856493455520180.338322-5.48741e-060
M80.1521454410790960.3397710.44780.6557950.327897
M9-1.981381357026890.345001-5.743100
M10-1.754207349806340.346507-5.06254e-062e-06
M11-1.100668258814780.34011-3.23620.0019070.000954


Multiple Linear Regression - Regression Statistics
Multiple R0.980495588337264
R-squared0.961371598748837
Adjusted R-squared0.954240201594776
F-TEST (value)134.808310066057
F-TEST (DF numerator)12
F-TEST (DF denominator)65
p-value0
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.583743276693048
Sum Squared Residuals22.1491538504819


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
114.514.6782379180418-0.178237918041825
214.313.99625050184850.303749498151452
315.315.21151597572590.0884840242741036
414.414.5092700599077-0.109270059907701
513.713.9260164874878-0.226016487487795
614.214.3580283889452-0.158028388945250
713.513.7048228084832-0.204822808483219
811.911.69373074146640.206269258533592
914.614.9986634823704-0.398663482370433
1015.615.6987470147223-0.0987470147222814
1114.114.3424206239058-0.242420623905796
1214.915.3248615014378-0.424861501437754
1314.214.4417831554763-0.241783155476253
1414.614.7056147895455-0.105614789545495
1517.217.4578362200996-0.257836220099595
1615.415.6915438727360-0.29154387273596
1714.314.3989260126191-0.0989260126190978
1817.517.19548553973310.304514460266929
1914.514.6506418587458-0.150641858745832
2014.414.29473312968860.105266870311413
2116.616.7720742016128-0.172074201612825
2216.717.1174755901162-0.417475590116195
2316.617.1798777746936-0.57987777469362
2416.917.4529543645286-0.552954364528624
2515.716.0969664934358-0.39696649343582
2616.416.24257074622220.157429253777763
2718.418.8765647954935-0.476564795493512
2816.917.3467272106955-0.44672721069553
2916.516.5270188757100-0.0270188757099678
3018.318.02307720871290.276922791287143
3115.115.1235513838771-0.0235513838771379
3215.715.7134617050825-0.0134617050825008
3318.118.4272575395724-0.327257539572389
3416.816.8810208275505-0.0810208275505417
3518.919.1897432565017-0.289743256501670
361918.98991032120540.0100896787946367
3718.117.87037721267820.22962278732179
3817.817.66129932161610.138700678383852
3921.521.24111242115000.258887578849966
4017.116.63736292299860.462637077001431
4118.719.1280212639321-0.428021263932143
421919.4418057841068-0.44180578410677
4316.416.6605073405539-0.26050734055388
4416.917.0139628991936-0.113962899193588
4518.618.7819396834209-0.181939683420869
4619.319.4820232157727-0.182023215772716
4719.420.2537896880471-0.853789688047104
4817.618.1623186522256-0.56231865222558
4918.619.5255605506378-0.925560550637774
5018.118.6071183718788-0.507118371878757
5120.421.5957945649985-1.19579456499851
5218.118.2925462609581-0.192546260958137
5319.619.6009307890634-0.000930789063447662
5419.920.6240795969350-0.724079596935033
5519.219.02505496621040.174945033789598
5617.818.7873736184360-0.987373618435979
5719.219.13662182726930.0633781727306502
582222.2012529852777-0.201252985277720
5921.121.08138135702690.0186186429731163
6019.518.87168293992250.628317060077465
6122.221.89010817629430.309891823705701
6220.921.6810302852322-0.781030285232237
6322.221.59579456499850.60420543500149
6423.523.49455103740250.00544896259751321
6521.521.37434150830580.125658491694158
6624.324.28912841670260.0108715832973603
6722.822.33542164212950.464578357870471
6820.319.49673790613290.803262093867063
6923.722.68344326575411.01655673424587
7023.322.31948036656050.980519633439453
7119.617.65278729982491.94721270017507
721817.09827222068010.901727779319857
7317.316.09696649343581.20303350656418
7416.816.00611598365660.793884016343421
7518.217.22138145753390.978618542466057
7616.515.92799863530160.572001364698384
771615.34474506288170.655254937118294
7818.417.66839506486440.73160493513562


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
160.009732492660854120.01946498532170820.990267507339146
170.003168137488616220.006336274977232440.996831862511384
180.01414625521808200.02829251043616410.985853744781918
190.004372359404155540.008744718808311080.995627640595844
200.001306298744187290.002612597488374590.998693701255813
210.0004778106317278270.0009556212634556530.999522189368272
220.0002533114489838210.0005066228979676420.999746688551016
230.0001262049862245390.0002524099724490780.999873795013775
243.99824145091164e-057.99648290182327e-050.99996001758549
251.37223613160377e-052.74447226320754e-050.999986277638684
264.04688491923357e-068.09376983846715e-060.99999595311508
272.45605398836595e-064.9121079767319e-060.999997543946012
288.3617539185452e-071.67235078370904e-060.999999163824608
293.94283250540627e-077.88566501081254e-070.99999960571675
302.16129265549682e-074.32258531099365e-070.999999783870734
317.79334161734906e-081.55866832346981e-070.999999922066584
322.01028992086117e-084.02057984172234e-080.9999999798971
336.03859113494223e-091.20771822698845e-080.999999993961409
342.42324259855201e-094.84648519710403e-090.999999997576757
351.09233485250410e-092.18466970500819e-090.999999998907665
363.4271187090009e-096.8542374180018e-090.999999996572881
376.68598564873209e-091.33719712974642e-080.999999993314014
381.76701960503517e-093.53403921007034e-090.99999999823298
391.59424344158696e-093.18848688317391e-090.999999998405757
401.16794497268976e-082.33588994537951e-080.99999998832055
411.02323293318461e-082.04646586636922e-080.99999998976767
422.21494860165548e-084.42989720331096e-080.999999977850514
431.23356324898483e-082.46712649796967e-080.999999987664367
444.63360642107868e-099.26721284215737e-090.999999995366394
452.52194452470515e-095.04388904941031e-090.999999997478055
461.24834160879368e-092.49668321758737e-090.999999998751658
477.94686583862144e-091.58937316772429e-080.999999992053134
481.18727878670707e-082.37455757341414e-080.999999988127212
493.25961854170414e-076.51923708340828e-070.999999674038146
504.26473317970132e-078.52946635940265e-070.999999573526682
514.44654527463367e-058.89309054926733e-050.999955534547254
522.87118929357833e-055.74237858715666e-050.999971288107064
531.70232491362704e-053.40464982725408e-050.999982976750864
546.35280041356182e-050.0001270560082712360.999936471995864
556.98944357101535e-050.0001397888714203070.99993010556429
560.003263358545111750.00652671709022350.996736641454888
570.02049708773639350.0409941754727870.979502912263607
580.06820101514469820.1364020302893960.931798984855302
590.6203298263986520.7593403472026950.379670173601348
600.5752398797783040.8495202404433910.424760120221696
610.4819902519126810.9639805038253620.518009748087319
620.9915505470677670.01689890586446590.00844945293223293


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level390.829787234042553NOK
5% type I error level430.914893617021277NOK
10% type I error level430.914893617021277NOK
 
Charts produced by software:
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258794747k1nj31fu7vu162i/10yr1t1258794649.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258794747k1nj31fu7vu162i/10yr1t1258794649.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258794747k1nj31fu7vu162i/1b8sq1258794649.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258794747k1nj31fu7vu162i/1b8sq1258794649.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258794747k1nj31fu7vu162i/29t7p1258794649.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258794747k1nj31fu7vu162i/29t7p1258794649.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258794747k1nj31fu7vu162i/3ynk51258794649.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258794747k1nj31fu7vu162i/3ynk51258794649.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258794747k1nj31fu7vu162i/4dn2g1258794649.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258794747k1nj31fu7vu162i/4dn2g1258794649.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258794747k1nj31fu7vu162i/5jsv51258794649.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258794747k1nj31fu7vu162i/5jsv51258794649.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258794747k1nj31fu7vu162i/6g2vf1258794649.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258794747k1nj31fu7vu162i/6g2vf1258794649.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258794747k1nj31fu7vu162i/7yi9d1258794649.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258794747k1nj31fu7vu162i/7yi9d1258794649.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258794747k1nj31fu7vu162i/8yg0x1258794649.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258794747k1nj31fu7vu162i/8yg0x1258794649.ps (open in new window)


http://www.freestatistics.org/blog/date/2009/Nov/21/t1258794747k1nj31fu7vu162i/9xoh31258794649.png (open in new window)
http://www.freestatistics.org/blog/date/2009/Nov/21/t1258794747k1nj31fu7vu162i/9xoh31258794649.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