R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(19876,45335,48674,156392,100837,101605,532850,294189,80763,105995,25045,90474,48481,50730,68694,207716,99132,104012,422632,364974,82687,66834,28408,97073,40284,24421,116346,72120,108751,91738,402216,390070,106045,110070,70668,167841,28607,95371,30605,131063,81214,85451,455196,454570,63114,74287,42350,113375),dim=c(1,48),dimnames=list(c(''),1:48)) > y <- array(NA,dim=c(1,48),dimnames=list(c(''),1:48)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = '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 > 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 M1 M2 M3 M4 M5 M6 M7 M8 M9 M10 M11 t 1 19876 1 0 0 0 0 0 0 0 0 0 0 1 2 45335 0 1 0 0 0 0 0 0 0 0 0 2 3 48674 0 0 1 0 0 0 0 0 0 0 0 3 4 156392 0 0 0 1 0 0 0 0 0 0 0 4 5 100837 0 0 0 0 1 0 0 0 0 0 0 5 6 101605 0 0 0 0 0 1 0 0 0 0 0 6 7 532850 0 0 0 0 0 0 1 0 0 0 0 7 8 294189 0 0 0 0 0 0 0 1 0 0 0 8 9 80763 0 0 0 0 0 0 0 0 1 0 0 9 10 105995 0 0 0 0 0 0 0 0 0 1 0 10 11 25045 0 0 0 0 0 0 0 0 0 0 1 11 12 90474 0 0 0 0 0 0 0 0 0 0 0 12 13 48481 1 0 0 0 0 0 0 0 0 0 0 13 14 50730 0 1 0 0 0 0 0 0 0 0 0 14 15 68694 0 0 1 0 0 0 0 0 0 0 0 15 16 207716 0 0 0 1 0 0 0 0 0 0 0 16 17 99132 0 0 0 0 1 0 0 0 0 0 0 17 18 104012 0 0 0 0 0 1 0 0 0 0 0 18 19 422632 0 0 0 0 0 0 1 0 0 0 0 19 20 364974 0 0 0 0 0 0 0 1 0 0 0 20 21 82687 0 0 0 0 0 0 0 0 1 0 0 21 22 66834 0 0 0 0 0 0 0 0 0 1 0 22 23 28408 0 0 0 0 0 0 0 0 0 0 1 23 24 97073 0 0 0 0 0 0 0 0 0 0 0 24 25 40284 1 0 0 0 0 0 0 0 0 0 0 25 26 24421 0 1 0 0 0 0 0 0 0 0 0 26 27 116346 0 0 1 0 0 0 0 0 0 0 0 27 28 72120 0 0 0 1 0 0 0 0 0 0 0 28 29 108751 0 0 0 0 1 0 0 0 0 0 0 29 30 91738 0 0 0 0 0 1 0 0 0 0 0 30 31 402216 0 0 0 0 0 0 1 0 0 0 0 31 32 390070 0 0 0 0 0 0 0 1 0 0 0 32 33 106045 0 0 0 0 0 0 0 0 1 0 0 33 34 110070 0 0 0 0 0 0 0 0 0 1 0 34 35 70668 0 0 0 0 0 0 0 0 0 0 1 35 36 167841 0 0 0 0 0 0 0 0 0 0 0 36 37 28607 1 0 0 0 0 0 0 0 0 0 0 37 38 95371 0 1 0 0 0 0 0 0 0 0 0 38 39 30605 0 0 1 0 0 0 0 0 0 0 0 39 40 131063 0 0 0 1 0 0 0 0 0 0 0 40 41 81214 0 0 0 0 1 0 0 0 0 0 0 41 42 85451 0 0 0 0 0 1 0 0 0 0 0 42 43 455196 0 0 0 0 0 0 1 0 0 0 0 43 44 454570 0 0 0 0 0 0 0 1 0 0 0 44 45 63114 0 0 0 0 0 0 0 0 1 0 0 45 46 74287 0 0 0 0 0 0 0 0 0 1 0 46 47 42350 0 0 0 0 0 0 0 0 0 0 1 47 48 113375 0 0 0 0 0 0 0 0 0 0 0 48 > k <- length(x[1,]) > df <- as.data.frame(x) > (mylm <- lm(df)) Call: lm(formula = df) Coefficients: (Intercept) M1 M2 M3 M4 M5 112634.5 -81208.1 -61707.7 -49744.1 25847.0 -18644.1 M6 M7 M8 M9 M10 M11 -20578.0 336792.1 259367.5 -33582.9 -27590.5 -75421.1 t 151.9 > (mysum <- summary(mylm)) Call: lm(formula = df) Residuals: Min 1Q Median 3Q Max -79028 -15440 -2162 13676 82360 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 112634.5 21955.1 5.130 1.08e-05 *** M1 -81208.1 26449.4 -3.070 0.00412 ** M2 -61707.7 26386.8 -2.339 0.02520 * M3 -49744.1 26330.0 -1.889 0.06716 . M4 25847.0 26279.1 0.984 0.33208 M5 -18644.1 26234.1 -0.711 0.48199 M6 -20578.0 26195.0 -0.786 0.43741 M7 336792.1 26161.9 12.873 7.79e-15 *** M8 259367.5 26134.8 9.924 1.03e-11 *** M9 -33582.9 26113.7 -1.286 0.20688 M10 -27590.5 26098.6 -1.057 0.29768 M11 -75421.1 26089.6 -2.891 0.00656 ** t 151.9 396.9 0.383 0.70429 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 36890 on 35 degrees of freedom Multiple R-squared: 0.9431, Adjusted R-squared: 0.9237 F-statistic: 48.39 on 12 and 35 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,] 0.09362683 0.18725366 0.90637317 [2,] 0.06815995 0.13631989 0.93184005 [3,] 0.03589997 0.07179995 0.96410003 [4,] 0.62597091 0.74805819 0.37402909 [5,] 0.67911521 0.64176959 0.32088479 [6,] 0.55653576 0.88692848 0.44346424 [7,] 0.49199172 0.98398344 0.50800828 [8,] 0.37935006 0.75870012 0.62064994 [9,] 0.31194647 0.62389294 0.68805353 [10,] 0.21176428 0.42352856 0.78823572 [11,] 0.24414208 0.48828415 0.75585792 [12,] 0.38336644 0.76673287 0.61663356 [13,] 0.68431712 0.63136576 0.31568288 [14,] 0.56806850 0.86386299 0.43193150 [15,] 0.42175001 0.84350001 0.57824999 [16,] 0.52484949 0.95030102 0.47515051 [17,] 0.98822911 0.02354177 0.01177089 > postscript(file="/var/www/rcomp/tmp/1ou7z1292767917.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/rcomp/tmp/2h4o21292767917.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/rcomp/tmp/3h4o21292767917.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/rcomp/tmp/4h4o21292767917.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/rcomp/tmp/5rd651292767917.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 = 48 Frequency = 1 1 2 3 4 5 6 -11702.2375 -5895.4875 -14671.9875 17303.0125 6087.2625 8637.2625 7 8 9 10 11 12 82360.2625 -79027.9875 344.5125 19432.2625 -13838.9875 -23982.9875 13 14 15 16 17 18 15080.2542 -2322.9958 3525.5042 66804.5042 2559.7542 9221.7542 19 20 21 22 23 24 -29680.2458 -10065.4958 446.0042 -21551.2458 -12298.4958 -19206.4958 25 26 27 28 29 30 5060.7458 -30454.5042 49354.9958 -70614.0042 10356.2458 -4874.7542 31 32 33 34 35 36 -51918.7542 13207.9958 21981.4958 19862.2458 28138.9958 49738.9958 37 38 39 40 41 42 -8438.7625 38672.9875 -38208.5125 -13493.5125 -19003.2625 -12984.2625 43 44 45 46 47 48 -761.2625 75885.4875 -22772.0125 -17743.2625 -2001.5125 -6549.5125 > postscript(file="/var/www/rcomp/tmp/6rd651292767917.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 = 48 Frequency = 1 lag(myerror, k = 1) myerror 0 -11702.2375 NA 1 -5895.4875 -11702.2375 2 -14671.9875 -5895.4875 3 17303.0125 -14671.9875 4 6087.2625 17303.0125 5 8637.2625 6087.2625 6 82360.2625 8637.2625 7 -79027.9875 82360.2625 8 344.5125 -79027.9875 9 19432.2625 344.5125 10 -13838.9875 19432.2625 11 -23982.9875 -13838.9875 12 15080.2542 -23982.9875 13 -2322.9958 15080.2542 14 3525.5042 -2322.9958 15 66804.5042 3525.5042 16 2559.7542 66804.5042 17 9221.7542 2559.7542 18 -29680.2458 9221.7542 19 -10065.4958 -29680.2458 20 446.0042 -10065.4958 21 -21551.2458 446.0042 22 -12298.4958 -21551.2458 23 -19206.4958 -12298.4958 24 5060.7458 -19206.4958 25 -30454.5042 5060.7458 26 49354.9958 -30454.5042 27 -70614.0042 49354.9958 28 10356.2458 -70614.0042 29 -4874.7542 10356.2458 30 -51918.7542 -4874.7542 31 13207.9958 -51918.7542 32 21981.4958 13207.9958 33 19862.2458 21981.4958 34 28138.9958 19862.2458 35 49738.9958 28138.9958 36 -8438.7625 49738.9958 37 38672.9875 -8438.7625 38 -38208.5125 38672.9875 39 -13493.5125 -38208.5125 40 -19003.2625 -13493.5125 41 -12984.2625 -19003.2625 42 -761.2625 -12984.2625 43 75885.4875 -761.2625 44 -22772.0125 75885.4875 45 -17743.2625 -22772.0125 46 -2001.5125 -17743.2625 47 -6549.5125 -2001.5125 48 NA -6549.5125 > dum1 <- dum[2:length(myerror),] > dum1 lag(myerror, k = 1) myerror [1,] -5895.4875 -11702.2375 [2,] -14671.9875 -5895.4875 [3,] 17303.0125 -14671.9875 [4,] 6087.2625 17303.0125 [5,] 8637.2625 6087.2625 [6,] 82360.2625 8637.2625 [7,] -79027.9875 82360.2625 [8,] 344.5125 -79027.9875 [9,] 19432.2625 344.5125 [10,] -13838.9875 19432.2625 [11,] -23982.9875 -13838.9875 [12,] 15080.2542 -23982.9875 [13,] -2322.9958 15080.2542 [14,] 3525.5042 -2322.9958 [15,] 66804.5042 3525.5042 [16,] 2559.7542 66804.5042 [17,] 9221.7542 2559.7542 [18,] -29680.2458 9221.7542 [19,] -10065.4958 -29680.2458 [20,] 446.0042 -10065.4958 [21,] -21551.2458 446.0042 [22,] -12298.4958 -21551.2458 [23,] -19206.4958 -12298.4958 [24,] 5060.7458 -19206.4958 [25,] -30454.5042 5060.7458 [26,] 49354.9958 -30454.5042 [27,] -70614.0042 49354.9958 [28,] 10356.2458 -70614.0042 [29,] -4874.7542 10356.2458 [30,] -51918.7542 -4874.7542 [31,] 13207.9958 -51918.7542 [32,] 21981.4958 13207.9958 [33,] 19862.2458 21981.4958 [34,] 28138.9958 19862.2458 [35,] 49738.9958 28138.9958 [36,] -8438.7625 49738.9958 [37,] 38672.9875 -8438.7625 [38,] -38208.5125 38672.9875 [39,] -13493.5125 -38208.5125 [40,] -19003.2625 -13493.5125 [41,] -12984.2625 -19003.2625 [42,] -761.2625 -12984.2625 [43,] 75885.4875 -761.2625 [44,] -22772.0125 75885.4875 [45,] -17743.2625 -22772.0125 [46,] -2001.5125 -17743.2625 [47,] -6549.5125 -2001.5125 > z <- as.data.frame(dum1) > z lag(myerror, k = 1) myerror 1 -5895.4875 -11702.2375 2 -14671.9875 -5895.4875 3 17303.0125 -14671.9875 4 6087.2625 17303.0125 5 8637.2625 6087.2625 6 82360.2625 8637.2625 7 -79027.9875 82360.2625 8 344.5125 -79027.9875 9 19432.2625 344.5125 10 -13838.9875 19432.2625 11 -23982.9875 -13838.9875 12 15080.2542 -23982.9875 13 -2322.9958 15080.2542 14 3525.5042 -2322.9958 15 66804.5042 3525.5042 16 2559.7542 66804.5042 17 9221.7542 2559.7542 18 -29680.2458 9221.7542 19 -10065.4958 -29680.2458 20 446.0042 -10065.4958 21 -21551.2458 446.0042 22 -12298.4958 -21551.2458 23 -19206.4958 -12298.4958 24 5060.7458 -19206.4958 25 -30454.5042 5060.7458 26 49354.9958 -30454.5042 27 -70614.0042 49354.9958 28 10356.2458 -70614.0042 29 -4874.7542 10356.2458 30 -51918.7542 -4874.7542 31 13207.9958 -51918.7542 32 21981.4958 13207.9958 33 19862.2458 21981.4958 34 28138.9958 19862.2458 35 49738.9958 28138.9958 36 -8438.7625 49738.9958 37 38672.9875 -8438.7625 38 -38208.5125 38672.9875 39 -13493.5125 -38208.5125 40 -19003.2625 -13493.5125 41 -12984.2625 -19003.2625 42 -761.2625 -12984.2625 43 75885.4875 -761.2625 44 -22772.0125 75885.4875 45 -17743.2625 -22772.0125 46 -2001.5125 -17743.2625 47 -6549.5125 -2001.5125 > 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/rcomp/tmp/7k4nq1292767917.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/rcomp/tmp/8k4nq1292767917.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/rcomp/tmp/9dd4t1292767917.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/rcomp/tmp/10dd4t1292767917.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/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/rcomp/tmp/11ywlz1292767917.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/rcomp/tmp/122wj51292767917.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/rcomp/tmp/13qxgh1292767917.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/rcomp/tmp/1417yk1292767917.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/rcomp/tmp/15m7e71292767917.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/rcomp/tmp/16jhug1292767917.tab") + } > > try(system("convert tmp/1ou7z1292767917.ps tmp/1ou7z1292767917.png",intern=TRUE)) character(0) > try(system("convert tmp/2h4o21292767917.ps tmp/2h4o21292767917.png",intern=TRUE)) character(0) > try(system("convert tmp/3h4o21292767917.ps tmp/3h4o21292767917.png",intern=TRUE)) character(0) > try(system("convert tmp/4h4o21292767917.ps tmp/4h4o21292767917.png",intern=TRUE)) character(0) > try(system("convert tmp/5rd651292767917.ps tmp/5rd651292767917.png",intern=TRUE)) character(0) > try(system("convert tmp/6rd651292767917.ps tmp/6rd651292767917.png",intern=TRUE)) character(0) > try(system("convert tmp/7k4nq1292767917.ps tmp/7k4nq1292767917.png",intern=TRUE)) character(0) > try(system("convert tmp/8k4nq1292767917.ps tmp/8k4nq1292767917.png",intern=TRUE)) character(0) > try(system("convert tmp/9dd4t1292767917.ps tmp/9dd4t1292767917.png",intern=TRUE)) character(0) > try(system("convert tmp/10dd4t1292767917.ps tmp/10dd4t1292767917.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.870 1.620 4.527