R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(100.35,102.1,100.35,102.86,100.36,102.99,100.39,103.73,100.34,105.02,100.34,104.43,100.35,104.63,100.43,104.93,100.47,105.87,100.67,105.66,100.75,106.76,100.78,106,100.79,107.22,100.67,107.33,100.64,107.11,100.64,108.86,100.76,107.72,100.79,107.88,100.79,108.38,100.9,107.72,100.98,108.41,101.11,109.9,101.18,111.45,101.22,112.18,101.23,113.34,101.09,113.46,101.26,114.06,101.28,115.54,101.43,116.39,101.53,115.94,101.54,116.97,101.54,115.94,101.79,115.91,102.18,116.43,102.37,116.26,102.46,116.35,102.46,117.9,102.03,117.7,102.26,117.53,102.33,117.86,102.44,117.65,102.5,116.51,102.52,115.93,102.66,115.31,102.72,115),dim=c(2,45),dimnames=list(c('ktot','vmtot'),1:45)) > y <- array(NA,dim=c(2,45),dimnames=list(c('ktot','vmtot'),1:45)) > 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 ktot vmtot 1 100.35 102.10 2 100.35 102.86 3 100.36 102.99 4 100.39 103.73 5 100.34 105.02 6 100.34 104.43 7 100.35 104.63 8 100.43 104.93 9 100.47 105.87 10 100.67 105.66 11 100.75 106.76 12 100.78 106.00 13 100.79 107.22 14 100.67 107.33 15 100.64 107.11 16 100.64 108.86 17 100.76 107.72 18 100.79 107.88 19 100.79 108.38 20 100.90 107.72 21 100.98 108.41 22 101.11 109.90 23 101.18 111.45 24 101.22 112.18 25 101.23 113.34 26 101.09 113.46 27 101.26 114.06 28 101.28 115.54 29 101.43 116.39 30 101.53 115.94 31 101.54 116.97 32 101.54 115.94 33 101.79 115.91 34 102.18 116.43 35 102.37 116.26 36 102.46 116.35 37 102.46 117.90 38 102.03 117.70 39 102.26 117.53 40 102.33 117.86 41 102.44 117.65 42 102.50 116.51 43 102.52 115.93 44 102.66 115.31 45 102.72 115.00 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) vmtot 86.1933 0.1359 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -0.61202 -0.15550 -0.02041 0.17318 0.90136 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 86.193313 1.098820 78.44 <2e-16 *** vmtot 0.135872 0.009884 13.75 <2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 0.3413 on 43 degrees of freedom Multiple R-squared: 0.8146, Adjusted R-squared: 0.8103 F-statistic: 189 on 1 and 43 DF, p-value: < 2.2e-16 > 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,] 3.423691e-04 6.847382e-04 0.999657631 [2,] 2.196312e-05 4.392623e-05 0.999978037 [3,] 1.042392e-06 2.084783e-06 0.999998958 [4,] 2.461882e-06 4.923763e-06 0.999997538 [5,] 1.516319e-06 3.032639e-06 0.999998484 [6,] 1.095558e-04 2.191116e-04 0.999890444 [7,] 1.357679e-04 2.715359e-04 0.999864232 [8,] 2.024202e-04 4.048404e-04 0.999797580 [9,] 7.134259e-05 1.426852e-04 0.999928657 [10,] 2.135392e-05 4.270784e-05 0.999978646 [11,] 6.106725e-06 1.221345e-05 0.999993893 [12,] 4.913254e-06 9.826508e-06 0.999995087 [13,] 1.418439e-06 2.836878e-06 0.999998582 [14,] 4.124115e-07 8.248230e-07 0.999999588 [15,] 9.850925e-08 1.970185e-07 0.999999901 [16,] 8.037745e-08 1.607549e-07 0.999999920 [17,] 6.635282e-08 1.327056e-07 0.999999934 [18,] 3.705265e-08 7.410530e-08 0.999999963 [19,] 9.654749e-09 1.930950e-08 0.999999990 [20,] 2.204219e-09 4.408437e-09 0.999999998 [21,] 6.971634e-10 1.394327e-09 0.999999999 [22,] 1.134407e-09 2.268815e-09 0.999999999 [23,] 7.558586e-10 1.511717e-09 0.999999999 [24,] 3.492080e-09 6.984160e-09 0.999999997 [25,] 9.738666e-09 1.947733e-08 0.999999990 [26,] 4.974822e-08 9.949643e-08 0.999999950 [27,] 4.578617e-07 9.157233e-07 0.999999542 [28,] 1.562760e-04 3.125520e-04 0.999843724 [29,] 1.663009e-01 3.326019e-01 0.833699073 [30,] 7.375158e-01 5.249685e-01 0.262484239 [31,] 9.083390e-01 1.833220e-01 0.091661007 [32,] 9.322526e-01 1.354948e-01 0.067747396 [33,] 9.568453e-01 8.630941e-02 0.043154703 [34,] 9.959516e-01 8.096705e-03 0.004048352 [35,] 9.974589e-01 5.082186e-03 0.002541093 [36,] 9.896048e-01 2.079042e-02 0.010395212 > postscript(file="/var/www/html/rcomp/tmp/1pyza1258750353.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/2fbvj1258750353.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/3mvyc1258750353.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/427wj1258750353.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/571ey1258750353.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 = 45 Frequency = 1 1 2 3 4 5 6 0.28411027 0.18084722 0.17318380 0.10263819 -0.12263726 -0.04247251 7 8 9 10 11 12 -0.05964700 -0.02040874 -0.10812883 0.12040438 0.05094470 0.18420775 13 14 15 16 17 18 0.02844337 -0.10650259 -0.10661066 -0.34438743 -0.06949285 -0.06123244 19 20 21 22 23 24 -0.12916866 0.07050715 0.05675517 -0.01569477 -0.15629705 -0.21548393 25 26 27 28 29 30 -0.36309597 -0.51940066 -0.43092412 -0.61201534 -0.57750691 -0.41636431 31 32 33 34 35 36 -0.54631293 -0.40636431 -0.15228814 0.16705819 0.38015651 0.45792799 37 38 39 40 41 42 0.24732570 -0.15549981 0.09759850 0.12276060 0.26129381 0.47618839 43 44 45 0.57499441 0.79923532 0.90135578 > postscript(file="/var/www/html/rcomp/tmp/696cw1258750353.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 = 45 Frequency = 1 lag(myerror, k = 1) myerror 0 0.28411027 NA 1 0.18084722 0.28411027 2 0.17318380 0.18084722 3 0.10263819 0.17318380 4 -0.12263726 0.10263819 5 -0.04247251 -0.12263726 6 -0.05964700 -0.04247251 7 -0.02040874 -0.05964700 8 -0.10812883 -0.02040874 9 0.12040438 -0.10812883 10 0.05094470 0.12040438 11 0.18420775 0.05094470 12 0.02844337 0.18420775 13 -0.10650259 0.02844337 14 -0.10661066 -0.10650259 15 -0.34438743 -0.10661066 16 -0.06949285 -0.34438743 17 -0.06123244 -0.06949285 18 -0.12916866 -0.06123244 19 0.07050715 -0.12916866 20 0.05675517 0.07050715 21 -0.01569477 0.05675517 22 -0.15629705 -0.01569477 23 -0.21548393 -0.15629705 24 -0.36309597 -0.21548393 25 -0.51940066 -0.36309597 26 -0.43092412 -0.51940066 27 -0.61201534 -0.43092412 28 -0.57750691 -0.61201534 29 -0.41636431 -0.57750691 30 -0.54631293 -0.41636431 31 -0.40636431 -0.54631293 32 -0.15228814 -0.40636431 33 0.16705819 -0.15228814 34 0.38015651 0.16705819 35 0.45792799 0.38015651 36 0.24732570 0.45792799 37 -0.15549981 0.24732570 38 0.09759850 -0.15549981 39 0.12276060 0.09759850 40 0.26129381 0.12276060 41 0.47618839 0.26129381 42 0.57499441 0.47618839 43 0.79923532 0.57499441 44 0.90135578 0.79923532 45 NA 0.90135578 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 0.18084722 0.28411027 [2,] 0.17318380 0.18084722 [3,] 0.10263819 0.17318380 [4,] -0.12263726 0.10263819 [5,] -0.04247251 -0.12263726 [6,] -0.05964700 -0.04247251 [7,] -0.02040874 -0.05964700 [8,] -0.10812883 -0.02040874 [9,] 0.12040438 -0.10812883 [10,] 0.05094470 0.12040438 [11,] 0.18420775 0.05094470 [12,] 0.02844337 0.18420775 [13,] -0.10650259 0.02844337 [14,] -0.10661066 -0.10650259 [15,] -0.34438743 -0.10661066 [16,] -0.06949285 -0.34438743 [17,] -0.06123244 -0.06949285 [18,] -0.12916866 -0.06123244 [19,] 0.07050715 -0.12916866 [20,] 0.05675517 0.07050715 [21,] -0.01569477 0.05675517 [22,] -0.15629705 -0.01569477 [23,] -0.21548393 -0.15629705 [24,] -0.36309597 -0.21548393 [25,] -0.51940066 -0.36309597 [26,] -0.43092412 -0.51940066 [27,] -0.61201534 -0.43092412 [28,] -0.57750691 -0.61201534 [29,] -0.41636431 -0.57750691 [30,] -0.54631293 -0.41636431 [31,] -0.40636431 -0.54631293 [32,] -0.15228814 -0.40636431 [33,] 0.16705819 -0.15228814 [34,] 0.38015651 0.16705819 [35,] 0.45792799 0.38015651 [36,] 0.24732570 0.45792799 [37,] -0.15549981 0.24732570 [38,] 0.09759850 -0.15549981 [39,] 0.12276060 0.09759850 [40,] 0.26129381 0.12276060 [41,] 0.47618839 0.26129381 [42,] 0.57499441 0.47618839 [43,] 0.79923532 0.57499441 [44,] 0.90135578 0.79923532 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 0.18084722 0.28411027 2 0.17318380 0.18084722 3 0.10263819 0.17318380 4 -0.12263726 0.10263819 5 -0.04247251 -0.12263726 6 -0.05964700 -0.04247251 7 -0.02040874 -0.05964700 8 -0.10812883 -0.02040874 9 0.12040438 -0.10812883 10 0.05094470 0.12040438 11 0.18420775 0.05094470 12 0.02844337 0.18420775 13 -0.10650259 0.02844337 14 -0.10661066 -0.10650259 15 -0.34438743 -0.10661066 16 -0.06949285 -0.34438743 17 -0.06123244 -0.06949285 18 -0.12916866 -0.06123244 19 0.07050715 -0.12916866 20 0.05675517 0.07050715 21 -0.01569477 0.05675517 22 -0.15629705 -0.01569477 23 -0.21548393 -0.15629705 24 -0.36309597 -0.21548393 25 -0.51940066 -0.36309597 26 -0.43092412 -0.51940066 27 -0.61201534 -0.43092412 28 -0.57750691 -0.61201534 29 -0.41636431 -0.57750691 30 -0.54631293 -0.41636431 31 -0.40636431 -0.54631293 32 -0.15228814 -0.40636431 33 0.16705819 -0.15228814 34 0.38015651 0.16705819 35 0.45792799 0.38015651 36 0.24732570 0.45792799 37 -0.15549981 0.24732570 38 0.09759850 -0.15549981 39 0.12276060 0.09759850 40 0.26129381 0.12276060 41 0.47618839 0.26129381 42 0.57499441 0.47618839 43 0.79923532 0.57499441 44 0.90135578 0.79923532 > 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/7085p1258750353.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/847lh1258750353.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/9y8i71258750353.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/10t9uu1258750353.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/113lww1258750353.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/1227ty1258750353.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/13klim1258750353.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/14ey8e1258750353.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/15wplp1258750353.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/162t0h1258750353.tab") + } > > system("convert tmp/1pyza1258750353.ps tmp/1pyza1258750353.png") > system("convert tmp/2fbvj1258750353.ps tmp/2fbvj1258750353.png") > system("convert tmp/3mvyc1258750353.ps tmp/3mvyc1258750353.png") > system("convert tmp/427wj1258750353.ps tmp/427wj1258750353.png") > system("convert tmp/571ey1258750353.ps tmp/571ey1258750353.png") > system("convert tmp/696cw1258750353.ps tmp/696cw1258750353.png") > system("convert tmp/7085p1258750353.ps tmp/7085p1258750353.png") > system("convert tmp/847lh1258750353.ps tmp/847lh1258750353.png") > system("convert tmp/9y8i71258750353.ps tmp/9y8i71258750353.png") > system("convert tmp/10t9uu1258750353.ps tmp/10t9uu1258750353.png") > > > proc.time() user system elapsed 2.309 1.524 2.763