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(149,134,123,116,117,111,105,102,95,93,124,130,124,115,106,105,105,101,95,93,84,87,116,120,117,109,105,107,109,109,108,107,99,103,131,137,135,124,118,121,121,118,113,107,100,102,130,136,133,120),dim=c(1,50),dimnames=list(c('-25'),1:50)) > y <- array(NA,dim=c(1,50),dimnames=list(c('-25'),1:50)) > 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 = 'Include Monthly 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 -25 M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 1 149 1 0 0 0 0 0 0 0 0 0 0 2 134 0 1 0 0 0 0 0 0 0 0 0 3 123 0 0 1 0 0 0 0 0 0 0 0 4 116 0 0 0 1 0 0 0 0 0 0 0 5 117 0 0 0 0 1 0 0 0 0 0 0 6 111 0 0 0 0 0 1 0 0 0 0 0 7 105 0 0 0 0 0 0 1 0 0 0 0 8 102 0 0 0 0 0 0 0 1 0 0 0 9 95 0 0 0 0 0 0 0 0 1 0 0 10 93 0 0 0 0 0 0 0 0 0 1 0 11 124 0 0 0 0 0 0 0 0 0 0 1 12 130 0 0 0 0 0 0 0 0 0 0 0 13 124 1 0 0 0 0 0 0 0 0 0 0 14 115 0 1 0 0 0 0 0 0 0 0 0 15 106 0 0 1 0 0 0 0 0 0 0 0 16 105 0 0 0 1 0 0 0 0 0 0 0 17 105 0 0 0 0 1 0 0 0 0 0 0 18 101 0 0 0 0 0 1 0 0 0 0 0 19 95 0 0 0 0 0 0 1 0 0 0 0 20 93 0 0 0 0 0 0 0 1 0 0 0 21 84 0 0 0 0 0 0 0 0 1 0 0 22 87 0 0 0 0 0 0 0 0 0 1 0 23 116 0 0 0 0 0 0 0 0 0 0 1 24 120 0 0 0 0 0 0 0 0 0 0 0 25 117 1 0 0 0 0 0 0 0 0 0 0 26 109 0 1 0 0 0 0 0 0 0 0 0 27 105 0 0 1 0 0 0 0 0 0 0 0 28 107 0 0 0 1 0 0 0 0 0 0 0 29 109 0 0 0 0 1 0 0 0 0 0 0 30 109 0 0 0 0 0 1 0 0 0 0 0 31 108 0 0 0 0 0 0 1 0 0 0 0 32 107 0 0 0 0 0 0 0 1 0 0 0 33 99 0 0 0 0 0 0 0 0 1 0 0 34 103 0 0 0 0 0 0 0 0 0 1 0 35 131 0 0 0 0 0 0 0 0 0 0 1 36 137 0 0 0 0 0 0 0 0 0 0 0 37 135 1 0 0 0 0 0 0 0 0 0 0 38 124 0 1 0 0 0 0 0 0 0 0 0 39 118 0 0 1 0 0 0 0 0 0 0 0 40 121 0 0 0 1 0 0 0 0 0 0 0 41 121 0 0 0 0 1 0 0 0 0 0 0 42 118 0 0 0 0 0 1 0 0 0 0 0 43 113 0 0 0 0 0 0 1 0 0 0 0 44 107 0 0 0 0 0 0 0 1 0 0 0 45 100 0 0 0 0 0 0 0 0 1 0 0 46 102 0 0 0 0 0 0 0 0 0 1 0 47 130 0 0 0 0 0 0 0 0 0 0 1 48 136 0 0 0 0 0 0 0 0 0 0 0 49 133 1 0 0 0 0 0 0 0 0 0 0 50 120 0 1 0 0 0 0 0 0 0 0 0 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) M1 M2 M3 M4 M5 130.75 0.85 -10.35 -17.75 -18.50 -17.75 M6 M7 M8 M9 M10 M11 -21.00 -25.50 -28.50 -36.25 -34.50 -5.50 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -14.600 -7.187 0.875 5.187 17.400 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 130.750 4.155 31.465 < 2e-16 *** M1 0.850 5.575 0.152 0.879627 M2 -10.350 5.575 -1.856 0.071151 . M3 -17.750 5.877 -3.020 0.004496 ** M4 -18.500 5.877 -3.148 0.003194 ** M5 -17.750 5.877 -3.020 0.004496 ** M6 -21.000 5.877 -3.573 0.000978 *** M7 -25.500 5.877 -4.339 0.000102 *** M8 -28.500 5.877 -4.850 2.12e-05 *** M9 -36.250 5.877 -6.168 3.34e-07 *** M10 -34.500 5.877 -5.871 8.56e-07 *** M11 -5.500 5.877 -0.936 0.355230 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 8.311 on 38 degrees of freedom Multiple R-squared: 0.73, Adjusted R-squared: 0.6518 F-statistic: 9.339 on 11 and 38 DF, p-value: 8.222e-08 > 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.9335805 1.328390e-01 6.641951e-02 [2,] 0.9002037 1.995926e-01 9.979631e-02 [3,] 0.8708137 2.583725e-01 1.291863e-01 [4,] 0.8399520 3.200959e-01 1.600480e-01 [5,] 0.8285777 3.428446e-01 1.714223e-01 [6,] 0.8112806 3.774387e-01 1.887194e-01 [7,] 0.8232589 3.534821e-01 1.767411e-01 [8,] 0.8266794 3.466412e-01 1.733206e-01 [9,] 0.8391288 3.217424e-01 1.608712e-01 [10,] 0.8916145 2.167710e-01 1.083855e-01 [11,] 0.9733948 5.321032e-02 2.660516e-02 [12,] 0.9892754 2.144922e-02 1.072461e-02 [13,] 0.9939547 1.209069e-02 6.045346e-03 [14,] 0.9982953 3.409490e-03 1.704745e-03 [15,] 0.9997367 5.266825e-04 2.633412e-04 [16,] 0.9999745 5.102517e-05 2.551259e-05 [17,] 0.9999884 2.317566e-05 1.158783e-05 [18,] 0.9999231 1.537364e-04 7.686821e-05 [19,] 0.9995658 8.683382e-04 4.341691e-04 [20,] 0.9977533 4.493373e-03 2.246687e-03 [21,] 0.9882442 2.351162e-02 1.175581e-02 > postscript(file="/var/www/html/rcomp/tmp/1oei91291128284.ps",horizontal=F,onefile=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/2gnzu1291128284.ps",horizontal=F,onefile=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/3gnzu1291128284.ps",horizontal=F,onefile=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/4gnzu1291128284.ps",horizontal=F,onefile=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/5gnzu1291128284.ps",horizontal=F,onefile=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 = 50 Frequency = 1 1 2 3 4 5 6 7 8 9 10 11 17.40 13.60 10.00 3.75 4.00 1.25 -0.25 -0.25 0.50 -3.25 -1.25 12 13 14 15 16 17 18 19 20 21 22 -0.75 -7.60 -5.40 -7.00 -7.25 -8.00 -8.75 -10.25 -9.25 -10.50 -9.25 23 24 25 26 27 28 29 30 31 32 33 -9.25 -10.75 -14.60 -11.40 -8.00 -5.25 -4.00 -0.75 2.75 4.75 4.50 34 35 36 37 38 39 40 41 42 43 44 6.75 5.75 6.25 3.40 3.60 5.00 8.75 8.00 8.25 7.75 4.75 45 46 47 48 49 50 5.50 5.75 4.75 5.25 1.40 -0.40 > postscript(file="/var/www/html/rcomp/tmp/69wyx1291128284.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > dum <- cbind(lag(myerror,k=1),myerror) > dum Time Series: Start = 0 End = 50 Frequency = 1 lag(myerror, k = 1) myerror 0 17.40 NA 1 13.60 17.40 2 10.00 13.60 3 3.75 10.00 4 4.00 3.75 5 1.25 4.00 6 -0.25 1.25 7 -0.25 -0.25 8 0.50 -0.25 9 -3.25 0.50 10 -1.25 -3.25 11 -0.75 -1.25 12 -7.60 -0.75 13 -5.40 -7.60 14 -7.00 -5.40 15 -7.25 -7.00 16 -8.00 -7.25 17 -8.75 -8.00 18 -10.25 -8.75 19 -9.25 -10.25 20 -10.50 -9.25 21 -9.25 -10.50 22 -9.25 -9.25 23 -10.75 -9.25 24 -14.60 -10.75 25 -11.40 -14.60 26 -8.00 -11.40 27 -5.25 -8.00 28 -4.00 -5.25 29 -0.75 -4.00 30 2.75 -0.75 31 4.75 2.75 32 4.50 4.75 33 6.75 4.50 34 5.75 6.75 35 6.25 5.75 36 3.40 6.25 37 3.60 3.40 38 5.00 3.60 39 8.75 5.00 40 8.00 8.75 41 8.25 8.00 42 7.75 8.25 43 4.75 7.75 44 5.50 4.75 45 5.75 5.50 46 4.75 5.75 47 5.25 4.75 48 1.40 5.25 49 -0.40 1.40 50 NA -0.40 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] 13.60 17.40 [2,] 10.00 13.60 [3,] 3.75 10.00 [4,] 4.00 3.75 [5,] 1.25 4.00 [6,] -0.25 1.25 [7,] -0.25 -0.25 [8,] 0.50 -0.25 [9,] -3.25 0.50 [10,] -1.25 -3.25 [11,] -0.75 -1.25 [12,] -7.60 -0.75 [13,] -5.40 -7.60 [14,] -7.00 -5.40 [15,] -7.25 -7.00 [16,] -8.00 -7.25 [17,] -8.75 -8.00 [18,] -10.25 -8.75 [19,] -9.25 -10.25 [20,] -10.50 -9.25 [21,] -9.25 -10.50 [22,] -9.25 -9.25 [23,] -10.75 -9.25 [24,] -14.60 -10.75 [25,] -11.40 -14.60 [26,] -8.00 -11.40 [27,] -5.25 -8.00 [28,] -4.00 -5.25 [29,] -0.75 -4.00 [30,] 2.75 -0.75 [31,] 4.75 2.75 [32,] 4.50 4.75 [33,] 6.75 4.50 [34,] 5.75 6.75 [35,] 6.25 5.75 [36,] 3.40 6.25 [37,] 3.60 3.40 [38,] 5.00 3.60 [39,] 8.75 5.00 [40,] 8.00 8.75 [41,] 8.25 8.00 [42,] 7.75 8.25 [43,] 4.75 7.75 [44,] 5.50 4.75 [45,] 5.75 5.50 [46,] 4.75 5.75 [47,] 5.25 4.75 [48,] 1.40 5.25 [49,] -0.40 1.40 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 13.60 17.40 2 10.00 13.60 3 3.75 10.00 4 4.00 3.75 5 1.25 4.00 6 -0.25 1.25 7 -0.25 -0.25 8 0.50 -0.25 9 -3.25 0.50 10 -1.25 -3.25 11 -0.75 -1.25 12 -7.60 -0.75 13 -5.40 -7.60 14 -7.00 -5.40 15 -7.25 -7.00 16 -8.00 -7.25 17 -8.75 -8.00 18 -10.25 -8.75 19 -9.25 -10.25 20 -10.50 -9.25 21 -9.25 -10.50 22 -9.25 -9.25 23 -10.75 -9.25 24 -14.60 -10.75 25 -11.40 -14.60 26 -8.00 -11.40 27 -5.25 -8.00 28 -4.00 -5.25 29 -0.75 -4.00 30 2.75 -0.75 31 4.75 2.75 32 4.50 4.75 33 6.75 4.50 34 5.75 6.75 35 6.25 5.75 36 3.40 6.25 37 3.60 3.40 38 5.00 3.60 39 8.75 5.00 40 8.00 8.75 41 8.25 8.00 42 7.75 8.25 43 4.75 7.75 44 5.50 4.75 45 5.75 5.50 46 4.75 5.75 47 5.25 4.75 48 1.40 5.25 49 -0.40 1.40 > 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/72ny01291128284.ps",horizontal=F,onefile=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/82ny01291128284.ps",horizontal=F,onefile=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/92ny01291128284.ps",horizontal=F,onefile=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/10dxx31291128284.ps",horizontal=F,onefile=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/11gxvq1291128284.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/121yce1291128284.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/13xqsn1291128284.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/14iqqb1291128284.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/154q6z1291128284.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/167rnn1291128284.tab") + } > > try(system("convert tmp/1oei91291128284.ps tmp/1oei91291128284.png",intern=TRUE)) character(0) > try(system("convert tmp/2gnzu1291128284.ps tmp/2gnzu1291128284.png",intern=TRUE)) character(0) > try(system("convert tmp/3gnzu1291128284.ps tmp/3gnzu1291128284.png",intern=TRUE)) character(0) > try(system("convert tmp/4gnzu1291128284.ps tmp/4gnzu1291128284.png",intern=TRUE)) character(0) > try(system("convert tmp/5gnzu1291128284.ps tmp/5gnzu1291128284.png",intern=TRUE)) character(0) > try(system("convert tmp/69wyx1291128284.ps tmp/69wyx1291128284.png",intern=TRUE)) character(0) > try(system("convert tmp/72ny01291128284.ps tmp/72ny01291128284.png",intern=TRUE)) character(0) > try(system("convert tmp/82ny01291128284.ps tmp/82ny01291128284.png",intern=TRUE)) character(0) > try(system("convert tmp/92ny01291128284.ps tmp/92ny01291128284.png",intern=TRUE)) character(0) > try(system("convert tmp/10dxx31291128284.ps tmp/10dxx31291128284.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.357 1.600 6.358