R version 2.8.0 (2008-10-20)
Copyright (C) 2008 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> x <- array(list(9190,0,9251,0,9328,0,9428,0,9499,0,9556,0,9606,0,9632,0,9660,0,9651,0,9695,0,9727,0,9757,0,9788,0,9813,0,9823,0,9837,0,9842,0,9855,0,9863,0,9855,0,9858,0,9853,0,9858,0,9859,0,9865,0,9876,0,9928,0,9948,0,9987,0,10022,1,10068,1,10101,1,10131,1,10143,1,10170,1,10192,1,10214,1,10239,1,10263,1,10310,1,10355,1,10396,1,10446,1,10511,1,10585,1,10667,1),dim=c(2,47),dimnames=list(c('Y','D'),1:47))
> y <- array(NA,dim=c(2,47),dimnames=list(c('Y','D'),1:47))
> for (i in 1:dim(x)[1])
+ {
+ for (j in 1:dim(x)[2])
+ {
+ y[i,j] <- as.numeric(x[i,j])
+ }
+ }
> par3 = 'No Linear Trend'
> par2 = 'Do not include Seasonal Dummies'
> par1 = '1'
> #'GNU S' R Code compiled by R2WASP v. 1.0.44 ()
> #Author: Prof. Dr. P. Wessa
> #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/
> #Source of accompanying publication: Office for Research, Development, and Education
> #Technical description: Write here your technical program description (don't use hard returns!)
> library(lattice)
> library(lmtest)
Loading required package: zoo
Attaching package: 'zoo'
The following object(s) are masked from package:base :
as.Date.numeric
> 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
Y D
1 9190 0
2 9251 0
3 9328 0
4 9428 0
5 9499 0
6 9556 0
7 9606 0
8 9632 0
9 9660 0
10 9651 0
11 9695 0
12 9727 0
13 9757 0
14 9788 0
15 9813 0
16 9823 0
17 9837 0
18 9842 0
19 9855 0
20 9863 0
21 9855 0
22 9858 0
23 9853 0
24 9858 0
25 9859 0
26 9865 0
27 9876 0
28 9928 0
29 9948 0
30 9987 0
31 10022 1
32 10068 1
33 10101 1
34 10131 1
35 10143 1
36 10170 1
37 10192 1
38 10214 1
39 10239 1
40 10263 1
41 10310 1
42 10355 1
43 10396 1
44 10446 1
45 10511 1
46 10585 1
47 10667 1
> k <- length(x[1,])
> df <- as.data.frame(x)
> (mylm <- lm(df))
Call:
lm(formula = df)
Coefficients:
(Intercept) D
9722.9 560.2
> (mysum <- summary(mylm))
Call:
lm(formula = df)
Residuals:
Min 1Q Median 3Q Max
-532.93 -115.03 34.07 135.07 383.88
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 9722.93 36.48 266.497 < 2e-16 ***
D 560.18 60.66 9.234 5.93e-12 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
Residual standard error: 199.8 on 45 degrees of freedom
Multiple R-squared: 0.6546, Adjusted R-squared: 0.6469
F-statistic: 85.27 on 1 and 45 DF, p-value: 5.934e-12
> 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
+ }
[,1] [,2] [,3]
[1,] 0.5961209 0.80775823 0.40387912
[2,] 0.7022781 0.59544390 0.29772195
[3,] 0.7915710 0.41685806 0.20842903
[4,] 0.8448721 0.31025586 0.15512793
[5,] 0.8809793 0.23804138 0.11902069
[6,] 0.8956824 0.20863524 0.10431762
[7,] 0.9135890 0.17282193 0.08641096
[8,] 0.9285111 0.14297779 0.07148890
[9,] 0.9399957 0.12000853 0.06000426
[10,] 0.9488183 0.10236338 0.05118169
[11,] 0.9546536 0.09069273 0.04534637
[12,] 0.9564606 0.08707885 0.04353942
[13,] 0.9560068 0.08798634 0.04399317
[14,] 0.9526677 0.09466456 0.04733228
[15,] 0.9475983 0.10480331 0.05240165
[16,] 0.9400763 0.11984731 0.05992366
[17,] 0.9278850 0.14423005 0.07211503
[18,] 0.9118198 0.17636040 0.08818020
[19,] 0.8904156 0.21916875 0.10958438
[20,] 0.8641636 0.27167282 0.13583641
[21,] 0.8323390 0.33532210 0.16766105
[22,] 0.7955233 0.40895331 0.20447666
[23,] 0.7548534 0.49029311 0.24514656
[24,] 0.7161013 0.56779745 0.28389872
[25,] 0.6749772 0.65004568 0.32502284
[26,] 0.6370445 0.72591099 0.36295550
[27,] 0.6593358 0.68132834 0.34066417
[28,] 0.6667513 0.66649731 0.33324865
[29,] 0.6671738 0.66565231 0.33282615
[30,] 0.6614829 0.67703413 0.33851706
[31,] 0.6645696 0.67086075 0.33543037
[32,] 0.6652380 0.66952407 0.33476204
[33,] 0.6686024 0.66279521 0.33139761
[34,] 0.6769653 0.64606944 0.32303472
[35,] 0.6903848 0.61923034 0.30961517
[36,] 0.7164175 0.56716495 0.28358247
[37,] 0.7243673 0.55126537 0.27563268
[38,] 0.7103456 0.57930877 0.28965439
> postscript(file="/var/www/html/rcomp/tmp/1y0c81227805716.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> 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()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/2pckc1227805716.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> plot(mysum$resid, type='b', pch=19, main='Residuals', ylab='value of Residuals', xlab='time or index')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/3asmk1227805716.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> hist(mysum$resid, main='Residual Histogram', xlab='values of Residuals')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/4k8p11227805716.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> densityplot(~mysum$resid,col='black',main='Residual Density Plot', xlab='values of Residuals')
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/54dmb1227805716.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> qqnorm(mysum$resid, main='Residual Normal Q-Q Plot')
> qqline(mysum$resid)
> grid()
> dev.off()
null device
1
> (myerror <- as.ts(mysum$resid))
Time Series:
Start = 1
End = 47
Frequency = 1
1 2 3 4 5 6
-532.933333 -471.933333 -394.933333 -294.933333 -223.933333 -166.933333
7 8 9 10 11 12
-116.933333 -90.933333 -62.933333 -71.933333 -27.933333 4.066667
13 14 15 16 17 18
34.066667 65.066667 90.066667 100.066667 114.066667 119.066667
19 20 21 22 23 24
132.066667 140.066667 132.066667 135.066667 130.066667 135.066667
25 26 27 28 29 30
136.066667 142.066667 153.066667 205.066667 225.066667 264.066667
31 32 33 34 35 36
-261.117647 -215.117647 -182.117647 -152.117647 -140.117647 -113.117647
37 38 39 40 41 42
-91.117647 -69.117647 -44.117647 -20.117647 26.882353 71.882353
43 44 45 46 47
112.882353 162.882353 227.882353 301.882353 383.882353
> postscript(file="/var/www/html/rcomp/tmp/6m7el1227805716.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> dum <- cbind(lag(myerror,k=1),myerror)
> dum
Time Series:
Start = 0
End = 47
Frequency = 1
lag(myerror, k = 1) myerror
0 -532.933333 NA
1 -471.933333 -532.933333
2 -394.933333 -471.933333
3 -294.933333 -394.933333
4 -223.933333 -294.933333
5 -166.933333 -223.933333
6 -116.933333 -166.933333
7 -90.933333 -116.933333
8 -62.933333 -90.933333
9 -71.933333 -62.933333
10 -27.933333 -71.933333
11 4.066667 -27.933333
12 34.066667 4.066667
13 65.066667 34.066667
14 90.066667 65.066667
15 100.066667 90.066667
16 114.066667 100.066667
17 119.066667 114.066667
18 132.066667 119.066667
19 140.066667 132.066667
20 132.066667 140.066667
21 135.066667 132.066667
22 130.066667 135.066667
23 135.066667 130.066667
24 136.066667 135.066667
25 142.066667 136.066667
26 153.066667 142.066667
27 205.066667 153.066667
28 225.066667 205.066667
29 264.066667 225.066667
30 -261.117647 264.066667
31 -215.117647 -261.117647
32 -182.117647 -215.117647
33 -152.117647 -182.117647
34 -140.117647 -152.117647
35 -113.117647 -140.117647
36 -91.117647 -113.117647
37 -69.117647 -91.117647
38 -44.117647 -69.117647
39 -20.117647 -44.117647
40 26.882353 -20.117647
41 71.882353 26.882353
42 112.882353 71.882353
43 162.882353 112.882353
44 227.882353 162.882353
45 301.882353 227.882353
46 383.882353 301.882353
47 NA 383.882353
> dum1 <- dum[2:length(myerror),]
> dum1
lag(myerror, k = 1) myerror
[1,] -471.933333 -532.933333
[2,] -394.933333 -471.933333
[3,] -294.933333 -394.933333
[4,] -223.933333 -294.933333
[5,] -166.933333 -223.933333
[6,] -116.933333 -166.933333
[7,] -90.933333 -116.933333
[8,] -62.933333 -90.933333
[9,] -71.933333 -62.933333
[10,] -27.933333 -71.933333
[11,] 4.066667 -27.933333
[12,] 34.066667 4.066667
[13,] 65.066667 34.066667
[14,] 90.066667 65.066667
[15,] 100.066667 90.066667
[16,] 114.066667 100.066667
[17,] 119.066667 114.066667
[18,] 132.066667 119.066667
[19,] 140.066667 132.066667
[20,] 132.066667 140.066667
[21,] 135.066667 132.066667
[22,] 130.066667 135.066667
[23,] 135.066667 130.066667
[24,] 136.066667 135.066667
[25,] 142.066667 136.066667
[26,] 153.066667 142.066667
[27,] 205.066667 153.066667
[28,] 225.066667 205.066667
[29,] 264.066667 225.066667
[30,] -261.117647 264.066667
[31,] -215.117647 -261.117647
[32,] -182.117647 -215.117647
[33,] -152.117647 -182.117647
[34,] -140.117647 -152.117647
[35,] -113.117647 -140.117647
[36,] -91.117647 -113.117647
[37,] -69.117647 -91.117647
[38,] -44.117647 -69.117647
[39,] -20.117647 -44.117647
[40,] 26.882353 -20.117647
[41,] 71.882353 26.882353
[42,] 112.882353 71.882353
[43,] 162.882353 112.882353
[44,] 227.882353 162.882353
[45,] 301.882353 227.882353
[46,] 383.882353 301.882353
> z <- as.data.frame(dum1)
> z
lag(myerror, k = 1) myerror
1 -471.933333 -532.933333
2 -394.933333 -471.933333
3 -294.933333 -394.933333
4 -223.933333 -294.933333
5 -166.933333 -223.933333
6 -116.933333 -166.933333
7 -90.933333 -116.933333
8 -62.933333 -90.933333
9 -71.933333 -62.933333
10 -27.933333 -71.933333
11 4.066667 -27.933333
12 34.066667 4.066667
13 65.066667 34.066667
14 90.066667 65.066667
15 100.066667 90.066667
16 114.066667 100.066667
17 119.066667 114.066667
18 132.066667 119.066667
19 140.066667 132.066667
20 132.066667 140.066667
21 135.066667 132.066667
22 130.066667 135.066667
23 135.066667 130.066667
24 136.066667 135.066667
25 142.066667 136.066667
26 153.066667 142.066667
27 205.066667 153.066667
28 225.066667 205.066667
29 264.066667 225.066667
30 -261.117647 264.066667
31 -215.117647 -261.117647
32 -182.117647 -215.117647
33 -152.117647 -182.117647
34 -140.117647 -152.117647
35 -113.117647 -140.117647
36 -91.117647 -113.117647
37 -69.117647 -91.117647
38 -44.117647 -69.117647
39 -20.117647 -44.117647
40 26.882353 -20.117647
41 71.882353 26.882353
42 112.882353 71.882353
43 162.882353 112.882353
44 227.882353 162.882353
45 301.882353 227.882353
46 383.882353 301.882353
> 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()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/7e9at1227805716.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> acf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/8yxz41227805716.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> pacf(mysum$resid, lag.max=length(mysum$resid)/2, main='Residual Partial Autocorrelation Function')
> grid()
> dev.off()
null device
1
> postscript(file="/var/www/html/rcomp/tmp/911421227805716.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
> opar <- par(mfrow = c(2,2), oma = c(0, 0, 1.1, 0))
> plot(mylm, las = 1, sub='Residual Diagnostics')
> par(opar)
> dev.off()
null device
1
> if (n > n25) {
+ postscript(file="/var/www/html/rcomp/tmp/100uqk1227805716.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556)
+ plot(kp3:nmkm3,gqarr[,2], main='Goldfeld-Quandt test',ylab='2-sided p-value',xlab='breakpoint')
+ grid()
+ dev.off()
+ }
null device
1
>
> #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
> load(file="/var/www/html/rcomp/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="/var/www/html/rcomp/tmp/11qflf1227805717.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
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="/var/www/html/rcomp/tmp/1279w91227805717.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="/var/www/html/rcomp/tmp/136hqp1227805717.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
Forecast', 1, TRUE)
> a<-table.element(a, 'Residuals
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="/var/www/html/rcomp/tmp/14ajli1227805717.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="/var/www/html/rcomp/tmp/15n2rq1227805717.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="/var/www/html/rcomp/tmp/16w03x1227805717.tab")
+ }
>
> system("convert tmp/1y0c81227805716.ps tmp/1y0c81227805716.png")
> system("convert tmp/2pckc1227805716.ps tmp/2pckc1227805716.png")
> system("convert tmp/3asmk1227805716.ps tmp/3asmk1227805716.png")
> system("convert tmp/4k8p11227805716.ps tmp/4k8p11227805716.png")
> system("convert tmp/54dmb1227805716.ps tmp/54dmb1227805716.png")
> system("convert tmp/6m7el1227805716.ps tmp/6m7el1227805716.png")
> system("convert tmp/7e9at1227805716.ps tmp/7e9at1227805716.png")
> system("convert tmp/8yxz41227805716.ps tmp/8yxz41227805716.png")
> system("convert tmp/911421227805716.ps tmp/911421227805716.png")
> system("convert tmp/100uqk1227805716.ps tmp/100uqk1227805716.png")
>
>
> proc.time()
user system elapsed
2.281 1.532 2.683