Home » date » 2008 » Nov » 27 »

*Unverified author*
R Software Module: rwasp_multipleregression.wasp (opens new window with default values)
Title produced by software: Multiple Regression
Date of computation: Thu, 27 Nov 2008 04:37:28 -0700
 
Cite this page as follows:
Statistical Computations at FreeStatistics.org, Office for Research Development and Education, URL http://www.freestatistics.org/blog/date/2008/Nov/27/t12277860535udi02qgsyruafk.htm/, Retrieved Thu, 27 Nov 2008 11:41:06 +0000
 
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/2008/Nov/27/t12277860535udi02qgsyruafk.htm/},
    year = {2008},
}
@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 = {2008},
    note = {{ISBN} 3-900051-07-0},
    url = {http://www.R-project.org},
}
 
Family? (F = Feedback message, R = changed R code, M = changed R Module, P = changed Parameters, D = changed Data)
 
Feedback Forum:

Post a new message
 
Original text written by user:
 
IsPrivate?
No (this computation is public)
 
User-defined keywords:
 
Dataseries X:
» Textbox « » Textfile « » CSV «
7,1 0 6,8 0 6,5 0 6,3 0 6,1 0 6,1 0 6,3 0 6,3 0 6,0 0 6,2 0 6,4 0 6,8 0 7,5 0 7,5 0 7,6 0 7,6 0 7,4 0 7,3 0 7,1 0 6,9 0 6,8 0 7,5 0 7,6 0 7,8 0 8,0 0 8,1 0 8,2 0 8,3 0 8,2 0 8,0 0 7,9 0 7,6 0 7,6 0 8,2 0 8,3 0 8,4 0 8,4 0 8,4 0 8,6 0 8,9 0 8,8 0 8,3 0 7,5 0 7,2 0 7,5 0 8,8 0 9,3 0 9,3 0 8,7 1 8,2 1 8,3 1 8,5 1 8,6 1 8,6 1 8,2 1 8,1 1 8,0 1 8,6 1 8,7 1 8,8 1 8,5 1 8,4 1 8,5 1 8,7 1 8,7 1 8,6 1 8,5 1 8,3 1 8,1 1 8,2 1 8,1 1 8,1 1 7,9 1 7,9 1 7,9 1 8,0 1 8,0 1 7,9 1 8,0 1 7,7 1 7,2 1 7,5 1 7,3 1 7,0 1 7,0 1 7,0 1 7,2 1 7,3 1 7,1 1 6,8 1 6,6 1 6,2 1 6,2 1 6,8 1 6,9 1 6,8 1
 
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
w[t] = + 7.59583333333333 + 0.0370833333333313d[t] + 0.0655902777777697M1[t] -0.0392361111111113M2[t] + 0.0184375000000004M3[t] + 0.113611111111111M4[t] + 0.0212847222222220M5[t] -0.146041666666667M6[t] -0.338368055555555M7[t] -0.568194444444444M8[t] -0.685520833333334M9[t] -0.140347222222223M10[t] -0.0451736111111113M11[t] + 0.00482638888888895t + e[t]


Multiple Linear Regression - Ordinary Least Squares
VariableParameterS.D.T-STAT
H0: parameter = 0
2-tail p-value1-tail p-value
(Intercept)7.595833333333330.35558821.361300
d0.03708333333333130.3435310.10790.9143010.45715
M10.06559027777776970.4163090.15760.8751970.437599
M2-0.03923611111111130.415323-0.09450.9249650.462483
M30.01843750000000040.414430.04450.9646230.482311
M40.1136111111111110.4136280.27470.7842610.39213
M50.02128472222222200.412920.05150.9590150.479508
M6-0.1460416666666670.412305-0.35420.7240930.362046
M7-0.3383680555555550.411784-0.82170.4136240.206812
M8-0.5681944444444440.411358-1.38130.170950.085475
M9-0.6855208333333340.411026-1.66780.0991640.049582
M10-0.1403472222222230.410788-0.34170.7334860.366743
M11-0.04517361111111130.410646-0.110.9126730.456337
t0.004826388888888950.0062470.77260.4419880.220994


Multiple Linear Regression - Regression Statistics
Multiple R0.347431893044433
R-squared0.120708920304438
Adjusted R-squared-0.0186908850131511
F-TEST (value)0.865918858562475
F-TEST (DF numerator)13
F-TEST (DF denominator)82
p-value0.590867401040405
Multiple Linear Regression - Residual Statistics
Residual Standard Deviation0.82119626948016
Sum Squared Residuals55.2977916666667


Multiple Linear Regression - Actuals, Interpolation, and Residuals
Time or IndexActualsInterpolation
Forecast
Residuals
Prediction Error
17.17.66625000000005-0.566250000000055
26.87.56625-0.766249999999999
36.57.62875-1.12875000000000
46.37.72875-1.42875000000000
56.17.64125-1.54125
66.17.47875-1.37875000000000
76.37.29125-0.99125
86.37.06625-0.766249999999998
966.95375-0.953749999999998
106.27.50375-1.30375000000000
116.47.60375-1.20375000000000
126.87.65375-0.853749999999999
137.57.72416666666666-0.224166666666658
147.57.62416666666667-0.124166666666667
157.67.68666666666666-0.0866666666666655
167.67.78666666666667-0.186666666666667
177.47.69916666666666-0.299166666666665
187.37.53666666666667-0.236666666666666
197.17.34916666666667-0.249166666666666
206.97.12416666666667-0.224166666666666
216.87.01166666666667-0.211666666666666
227.57.56166666666667-0.0616666666666656
237.67.66166666666667-0.0616666666666661
247.87.711666666666670.088333333333334
2587.782083333333330.217916666666675
268.17.682083333333330.417916666666665
278.27.744583333333330.455416666666667
288.37.844583333333330.455416666666666
298.27.757083333333330.442916666666667
3087.594583333333330.405416666666667
317.97.407083333333330.492916666666667
327.67.182083333333330.417916666666666
337.67.069583333333330.530416666666667
348.27.619583333333330.580416666666666
358.37.719583333333330.580416666666667
368.47.769583333333330.630416666666667
378.47.839999999999990.560000000000008
388.47.740.659999999999999
398.67.80250.7975
408.97.90250.9975
418.87.8150.985000000000001
428.37.65250.6475
437.57.4650.0349999999999994
447.27.24-0.0400000000000007
457.57.12750.372499999999999
468.87.67751.1225
479.37.77751.5225
489.37.82751.4725
498.77.934999999999990.765000000000008
508.27.8350.364999999999999
518.37.89750.402500000000002
528.57.99750.502499999999999
538.67.910.690000000000001
548.67.74750.8525
558.27.560.64
568.17.3350.765
5787.22250.777500000000001
588.67.77250.8275
598.77.87250.8275
608.87.92250.877500000000002
618.57.992916666666660.507083333333341
628.47.892916666666670.507083333333333
638.57.955416666666670.544583333333334
648.78.055416666666670.644583333333331
658.77.967916666666670.732083333333333
668.67.805416666666670.794583333333333
678.57.617916666666670.882083333333333
688.37.392916666666670.907083333333334
698.17.280416666666670.819583333333333
708.27.830416666666670.369583333333332
718.17.930416666666670.169583333333333
728.17.980416666666670.119583333333333
737.98.05083333333333-0.150833333333326
747.97.95083333333334-0.0508333333333349
757.98.01333333333333-0.113333333333333
7688.11333333333334-0.113333333333335
7788.02583333333333-0.0258333333333336
787.97.863333333333330.0366666666666662
7987.675833333333330.324166666666666
807.77.450833333333330.249166666666666
817.27.33833333333333-0.138333333333334
827.57.88833333333333-0.388333333333334
837.37.98833333333333-0.688333333333335
8478.03833333333333-1.03833333333333
8578.10875-1.10874999999999
8678.00875-1.00875000000000
877.28.07125-0.871250000000001
887.38.17125-0.871250000000003
897.18.08375-0.98375
906.87.92125-1.12125000000000
916.67.73375-1.13375000000000
926.27.50875-1.30875
936.27.39625-1.19625
946.87.94625-1.14625000000000
956.98.04625-1.14625000000000
966.88.09625-1.29625000000000


Goldfeld-Quandt test for Heteroskedasticity
p-valuesAlternative Hypothesis
breakpoint indexgreater2-sidedless
170.1760774883072770.3521549766145540.823922511692723
180.09550455108752160.1910091021750430.904495448912478
190.05128328295102830.1025665659020570.948716717048972
200.03725773992094850.0745154798418970.962742260079052
210.02158858778620480.04317717557240960.978411412213795
220.01987733508729580.03975467017459170.980122664912704
230.01607887752378900.03215775504757810.983921122476211
240.01071281672081180.02142563344162360.989287183279188
250.03668876097033670.07337752194067350.963311239029663
260.03028982278710980.06057964557421950.96971017721289
270.01889086117743330.03778172235486660.981109138822567
280.01234028092289720.02468056184579450.987659719077103
290.009327051927296160.01865410385459230.990672948072704
300.006520065403121660.01304013080624330.993479934596878
310.004269550087510540.008539100175021080.99573044991249
320.003869634137222600.007739268274445190.996130365862777
330.002635863590798070.005271727181596150.997364136409202
340.001934444532766510.003868889065533020.998065555467234
350.001437249322658110.002874498645316210.998562750677342
360.001070547248386590.002141094496773180.998929452751613
370.006749711128810290.01349942225762060.99325028887119
380.01252285536891380.02504571073782750.987477144631086
390.01017531207784450.02035062415568890.989824687922155
400.006220960072861470.01244192014572290.993779039927138
410.003737482354193380.007474964708386760.996262517645807
420.003026095682950940.006052191365901880.99697390431705
430.04658733430111370.09317466860222750.953412665698886
440.3461789550257290.6923579100514590.653821044974271
450.5961717057606590.8076565884786810.403828294239341
460.5843611324210270.8312777351579450.415638867578973
470.5831431244567520.8337137510864960.416856875543248
480.5333233038909970.9333533922180070.466676696109003
490.474139182238170.948278364476340.52586081776183
500.5407194223004760.9185611553990480.459280577699524
510.6142935112390430.7714129775219130.385706488760957
520.6884768970046260.6230462059907480.311523102995374
530.7375905344143050.524818931171390.262409465585695
540.7658781224941820.4682437550116350.234121877505818
550.8979134829915640.2041730340168710.102086517008436
560.9577391828888730.08452163422225380.0422608171111269
570.9835509245957830.03289815080843450.0164490754042172
580.9871083679091010.02578326418179750.0128916320908988
590.9853667149640550.02926657007189090.0146332850359455
600.977343356979610.04531328604078030.0226566430203902
610.9813762027203220.03724759455935540.0186237972796777
620.9842774721159960.03144505576800760.0157225278840038
630.9851120053190380.02977598936192370.0148879946809619
640.9810042071035060.03799158579298810.0189957928964941
650.9714992578343210.05700148433135790.0285007421656790
660.9556148658024650.08877026839507010.0443851341975351
670.9309513034937950.1380973930124110.0690486965062053
680.8993127701925740.2013744596148520.100687229807426
690.8674012371691320.2651975256617350.132598762830868
700.8616805060938880.2766389878122240.138319493906112
710.883515274476040.2329694510479210.116484725523960
720.884014071752160.2319718564956790.115985928247839
730.8990149378993930.2019701242012130.100985062100607
740.8837240883693350.2325518232613290.116275911630665
750.8599005358763630.2801989282472740.140099464123637
760.8185743678470530.3628512643058940.181425632152947
770.7386802709520490.5226394580959030.261319729047951
780.6375223977825620.7249552044348750.362477602217438
790.5936335593678850.8127328812642290.406366440632115


Meta Analysis of Goldfeld-Quandt test for Heteroskedasticity
Description# significant tests% significant testsOK/NOK
1% type I error level80.126984126984127NOK
5% type I error level280.444444444444444NOK
10% type I error level350.555555555555556NOK
 
Charts produced by software:
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277860535udi02qgsyruafk/10dhce1227785843.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277860535udi02qgsyruafk/10dhce1227785843.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277860535udi02qgsyruafk/1mk6o1227785842.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277860535udi02qgsyruafk/1mk6o1227785842.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277860535udi02qgsyruafk/23vlm1227785842.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277860535udi02qgsyruafk/23vlm1227785842.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277860535udi02qgsyruafk/33umy1227785842.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277860535udi02qgsyruafk/33umy1227785842.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277860535udi02qgsyruafk/44dq91227785842.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277860535udi02qgsyruafk/44dq91227785842.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277860535udi02qgsyruafk/5l3gm1227785842.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277860535udi02qgsyruafk/5l3gm1227785842.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277860535udi02qgsyruafk/6gaec1227785842.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277860535udi02qgsyruafk/6gaec1227785842.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277860535udi02qgsyruafk/7hx2j1227785842.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277860535udi02qgsyruafk/7hx2j1227785842.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277860535udi02qgsyruafk/8jy8y1227785842.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277860535udi02qgsyruafk/8jy8y1227785842.ps (open in new window)


http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277860535udi02qgsyruafk/9yx871227785842.png (open in new window)
http://127.0.0.1/wessadotnet/public_html/freestatisticsdotorg/blog/date/2008/Nov/27/t12277860535udi02qgsyruafk/9yx871227785842.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