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 <- c(20366,22782,19169,13807,29743,25591,29096,26482,22405,27044,17970,18730,19684,19785,18479,10698,31956,29506,34506,27165,26736,23691,18157,17328,18205,20995,17382,9367,31124,26551,30651,25859,25100,25778,20418,18688,20424,24776,19814,12738,31566,30111,30019,31934,25826,26835,20205,17789,20520,22518,15572,11509,25447,24090,27786,26195,20516,22759,19028,16971) > par9 = '0' > par8 = '0' > par7 = '0' > par6 = '3' > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1' > par1 = 'FALSE' > library(lattice) > if (par1 == 'TRUE') par1 <- TRUE > if (par1 == 'FALSE') par1 <- FALSE > par2 <- as.numeric(par2) #Box-Cox lambda transformation parameter > par3 <- as.numeric(par3) #degree of non-seasonal differencing > par4 <- as.numeric(par4) #degree of seasonal differencing > par5 <- as.numeric(par5) #seasonal period > par6 <- as.numeric(par6) #degree (p) of the non-seasonal AR(p) polynomial > par6 <- 11 > par7 <- as.numeric(par7) #degree (q) of the non-seasonal MA(q) polynomial > par8 <- as.numeric(par8) #degree (P) of the seasonal AR(P) polynomial > par9 <- as.numeric(par9) #degree (Q) of the seasonal MA(Q) polynomial > armaGR <- function(arima.out, names, n){ + try1 <- arima.out$coef + try2 <- sqrt(diag(arima.out$var.coef)) + try.data.frame <- data.frame(matrix(NA,ncol=4,nrow=length(names))) + dimnames(try.data.frame) <- list(names,c('coef','std','tstat','pv')) + try.data.frame[,1] <- try1 + for(i in 1:length(try2)) try.data.frame[which(rownames(try.data.frame)==names(try2)[i]),2] <- try2[i] + try.data.frame[,3] <- try.data.frame[,1] / try.data.frame[,2] + try.data.frame[,4] <- round((1-pt(abs(try.data.frame[,3]),df=n-(length(try2)+1)))*2,5) + vector <- rep(NA,length(names)) + vector[is.na(try.data.frame[,4])] <- 0 + maxi <- which.max(try.data.frame[,4]) + continue <- max(try.data.frame[,4],na.rm=TRUE) > .05 + vector[maxi] <- 0 + list(summary=try.data.frame,next.vector=vector,continue=continue) + } > arimaSelect <- function(series, order=c(13,0,0), seasonal=list(order=c(2,0,0),period=12), include.mean=F){ + nrc <- order[1]+order[3]+seasonal$order[1]+seasonal$order[3] + coeff <- matrix(NA, nrow=nrc*2, ncol=nrc) + pval <- matrix(NA, nrow=nrc*2, ncol=nrc) + mylist <- rep(list(NULL), nrc) + names <- NULL + if(order[1] > 0) names <- paste('ar',1:order[1],sep='') + if(order[3] > 0) names <- c( names , paste('ma',1:order[3],sep='') ) + if(seasonal$order[1] > 0) names <- c(names, paste('sar',1:seasonal$order[1],sep='')) + if(seasonal$order[3] > 0) names <- c(names, paste('sma',1:seasonal$order[3],sep='')) + arima.out <- arima(series, order=order, seasonal=seasonal, include.mean=include.mean, method='ML') + mylist[[1]] <- arima.out + last.arma <- armaGR(arima.out, names, length(series)) + mystop <- FALSE + i <- 1 + coeff[i,] <- last.arma[[1]][,1] + pval [i,] <- last.arma[[1]][,4] + i <- 2 + aic <- arima.out$aic + while(!mystop){ + mylist[[i]] <- arima.out + arima.out <- arima(series, order=order, seasonal=seasonal, include.mean=include.mean, method='ML', fixed=last.arma$next.vector) + aic <- c(aic, arima.out$aic) + last.arma <- armaGR(arima.out, names, length(series)) + mystop <- !last.arma$continue + coeff[i,] <- last.arma[[1]][,1] + pval [i,] <- last.arma[[1]][,4] + i <- i+1 + } + list(coeff, pval, mylist, aic=aic) + } > arimaSelectplot <- function(arimaSelect.out,noms,choix){ + noms <- names(arimaSelect.out[[3]][[1]]$coef) + coeff <- arimaSelect.out[[1]] + k <- min(which(is.na(coeff[,1])))-1 + coeff <- coeff[1:k,] + pval <- arimaSelect.out[[2]][1:k,] + aic <- arimaSelect.out$aic[1:k] + coeff[coeff==0] <- NA + n <- ncol(coeff) + if(missing(choix)) choix <- k + layout(matrix(c(1,1,1,2, + 3,3,3,2, + 3,3,3,4, + 5,6,7,7),nr=4), + widths=c(10,35,45,15), + heights=c(30,30,15,15)) + couleurs <- rainbow(75)[1:50]#(50) + ticks <- pretty(coeff) + par(mar=c(1,1,3,1)) + plot(aic,k:1-.5,type='o',pch=21,bg='blue',cex=2,axes=F,lty=2,xpd=NA) + points(aic[choix],k-choix+.5,pch=21,cex=4,bg=2,xpd=NA) + title('aic',line=2) + par(mar=c(3,0,0,0)) + plot(0,axes=F,xlab='',ylab='',xlim=range(ticks),ylim=c(.1,1)) + rect(xleft = min(ticks) + (0:49)/50*(max(ticks)-min(ticks)), + xright = min(ticks) + (1:50)/50*(max(ticks)-min(ticks)), + ytop = rep(1,50), + ybottom= rep(0,50),col=couleurs,border=NA) + axis(1,ticks) + rect(xleft=min(ticks),xright=max(ticks),ytop=1,ybottom=0) + text(mean(coeff,na.rm=T),.5,'coefficients',cex=2,font=2) + par(mar=c(1,1,3,1)) + image(1:n,1:k,t(coeff[k:1,]),axes=F,col=couleurs,zlim=range(ticks)) + for(i in 1:n) for(j in 1:k) if(!is.na(coeff[j,i])) { + if(pval[j,i]<.01) symb = 'green' + else if( (pval[j,i]<.05) & (pval[j,i]>=.01)) symb = 'orange' + else if( (pval[j,i]<.1) & (pval[j,i]>=.05)) symb = 'red' + else symb = 'black' + polygon(c(i+.5 ,i+.2 ,i+.5 ,i+.5), + c(k-j+0.5,k-j+0.5,k-j+0.8,k-j+0.5), + col=symb) + if(j==choix) { + rect(xleft=i-.5, + xright=i+.5, + ybottom=k-j+1.5, + ytop=k-j+.5, + lwd=4) + text(i, + k-j+1, + round(coeff[j,i],2), + cex=1.2, + font=2) + } + else{ + rect(xleft=i-.5,xright=i+.5,ybottom=k-j+1.5,ytop=k-j+.5) + text(i,k-j+1,round(coeff[j,i],2),cex=1.2,font=1) + } + } + axis(3,1:n,noms) + par(mar=c(0.5,0,0,0.5)) + plot(0,axes=F,xlab='',ylab='',type='n',xlim=c(0,8),ylim=c(-.2,.8)) + cols <- c('green','orange','red','black') + niv <- c('0','0.01','0.05','0.1') + for(i in 0:3){ + polygon(c(1+2*i ,1+2*i ,1+2*i-.5 ,1+2*i), + c(.4 ,.7 , .4 , .4), + col=cols[i+1]) + text(2*i,0.5,niv[i+1],cex=1.5) + } + text(8,.5,1,cex=1.5) + text(4,0,'p-value',cex=2) + box() + residus <- arimaSelect.out[[3]][[choix]]$res + par(mar=c(1,2,4,1)) + acf(residus,main='') + title('acf',line=.5) + par(mar=c(1,2,4,1)) + pacf(residus,main='') + title('pacf',line=.5) + par(mar=c(2,2,4,1)) + qqnorm(residus,main='') + title('qq-norm',line=.5) + qqline(residus) + residus + } > if (par2 == 0) x <- log(x) > if (par2 != 0) x <- x^par2 > (selection <- arimaSelect(x, order=c(par6,par3,par7), seasonal=list(order=c(par8,par4,par9), period=par5))) [[1]] [,1] [,2] [,3] [,4] [,5] [,6] [1,] -0.8947101 -0.81328470 -0.79271863 -0.8335598 -0.7956897 -0.8516757 [2,] 0.0000000 -0.19249689 -0.25940266 -0.3014542 -0.2676579 -0.5226926 [3,] 0.0000000 -0.14813453 -0.18806961 -0.2293333 -0.2113974 -0.4594001 [4,] 0.0000000 -0.07787069 -0.14635435 -0.2037729 -0.1829222 -0.4402076 [5,] 0.0000000 0.00000000 -0.11901805 -0.1949794 -0.1750471 -0.4289177 [6,] 0.0000000 0.00000000 -0.06895138 -0.1743767 -0.1658434 -0.4195976 [7,] 0.0000000 0.00000000 0.00000000 -0.1503142 -0.1569039 -0.4119782 [8,] 0.0000000 0.00000000 0.00000000 -0.0964468 0.0000000 -0.3572087 [9,] 0.0000000 0.00000000 0.00000000 0.0000000 0.0000000 -0.3557287 [10,] 0.0000000 0.00000000 0.00000000 0.0000000 0.0000000 -0.3623552 [11,] NA NA NA NA NA NA [12,] NA NA NA NA NA NA [13,] NA NA NA NA NA NA [14,] NA NA NA NA NA NA [15,] NA NA NA NA NA NA [16,] NA NA NA NA NA NA [17,] NA NA NA NA NA NA [18,] NA NA NA NA NA NA [19,] NA NA NA NA NA NA [20,] NA NA NA NA NA NA [21,] NA NA NA NA NA NA [22,] NA NA NA NA NA NA [,7] [,8] [,9] [,10] [,11] [1,] -0.8235562 -0.7827705 -0.7777364 -0.8392667 -0.8230619 [2,] -0.1371522 -0.1826875 -0.2099807 -0.2551538 -0.4071318 [3,] 0.0000000 -0.1268247 -0.1759422 -0.2291537 -0.3860442 [4,] 0.0000000 0.0000000 -0.1319841 -0.2104613 -0.3657441 [5,] 0.0000000 0.0000000 -0.1190150 -0.2073693 -0.3633441 [6,] 0.0000000 0.0000000 0.0000000 -0.1749377 -0.3592179 [7,] 0.0000000 0.0000000 0.0000000 -0.1717812 -0.3578576 [8,] 0.0000000 0.0000000 0.0000000 -0.1505407 -0.3007543 [9,] 0.0000000 0.0000000 0.0000000 -0.1087963 -0.2976629 [10,] 0.0000000 0.0000000 0.0000000 0.0000000 -0.2665596 [11,] NA NA NA NA NA [12,] NA NA NA NA NA [13,] NA NA NA NA NA [14,] NA NA NA NA NA [15,] NA NA NA NA NA [16,] NA NA NA NA NA [17,] NA NA NA NA NA [18,] NA NA NA NA NA [19,] NA NA NA NA NA [20,] NA NA NA NA NA [21,] NA NA NA NA NA [22,] NA NA NA NA NA [[2]] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 0 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 0.00000 [2,] NA 0.15421 0.07203 0.03511 0.07265 0.00019 0.24163 0.18182 0.10066 [3,] NA 0.25793 0.14446 0.06901 0.13198 0.00040 NA 0.34210 0.17828 [4,] NA 0.47701 0.23998 0.10090 0.18225 0.00061 NA NA 0.29818 [5,] NA NA 0.32792 0.13618 0.21263 0.00080 NA NA 0.34591 [6,] NA NA 0.54114 0.18831 0.24011 0.00106 NA NA NA [7,] NA NA NA 0.25262 0.27366 0.00127 NA NA NA [8,] NA NA NA 0.44024 NA 0.00248 NA NA NA [9,] NA NA NA NA NA 0.00273 NA NA NA [10,] NA NA NA NA NA 0.00249 NA NA NA [11,] NA NA NA NA NA NA NA NA NA [12,] NA NA NA NA NA NA NA NA NA [13,] NA NA NA NA NA NA NA NA NA [14,] NA NA NA NA NA NA NA NA NA [15,] NA NA NA NA NA NA NA NA NA [16,] NA NA NA NA NA NA NA NA NA [17,] NA NA NA NA NA NA NA NA NA [18,] NA NA NA NA NA NA NA NA NA [19,] NA NA NA NA NA NA NA NA NA [20,] NA NA NA NA NA NA NA NA NA [21,] NA NA NA NA NA NA NA NA NA [22,] NA NA NA NA NA NA NA NA NA [,10] [,11] [1,] 0.00000 0.00000 [2,] 0.02930 0.00082 [3,] 0.05507 0.00163 [4,] 0.08804 0.00289 [5,] 0.09917 0.00364 [6,] 0.17431 0.00560 [7,] 0.18749 0.00658 [8,] 0.25836 0.01560 [9,] 0.37489 0.01695 [10,] NA 0.02833 [11,] NA NA [12,] NA NA [13,] NA NA [14,] NA NA [15,] NA NA [16,] NA NA [17,] NA NA [18,] NA NA [19,] NA NA [20,] NA NA [21,] NA NA [22,] NA NA [[3]] [[3]][[1]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, method = "ML") Coefficients: ar1 ar2 ar3 ar4 ar5 ar6 ar7 ar8 -0.8947 -0.8133 -0.7927 -0.8336 -0.7957 -0.8517 -0.8236 -0.7828 s.e. 0.0669 0.0765 0.0786 0.0782 0.0791 0.0683 0.0780 0.0812 ar9 ar10 ar11 -0.7777 -0.8393 -0.8231 s.e. 0.0795 0.0738 0.0593 sigma^2 estimated as 7194010: log likelihood = -557.13, aic = 1138.25 [[3]][[2]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, method = "ML") Coefficients: ar1 ar2 ar3 ar4 ar5 ar6 ar7 ar8 -0.8947 -0.8133 -0.7927 -0.8336 -0.7957 -0.8517 -0.8236 -0.7828 s.e. 0.0669 0.0765 0.0786 0.0782 0.0791 0.0683 0.0780 0.0812 ar9 ar10 ar11 -0.7777 -0.8393 -0.8231 s.e. 0.0795 0.0738 0.0593 sigma^2 estimated as 7194010: log likelihood = -557.13, aic = 1138.25 [[3]][[3]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, fixed = last.arma$next.vector, method = "ML") Coefficients: ar1 ar2 ar3 ar4 ar5 ar6 ar7 ar8 0 -0.1925 -0.2594 -0.3015 -0.2677 -0.5227 -0.1372 -0.1827 s.e. 0 0.1330 0.1411 0.1391 0.1459 0.1292 0.1157 0.1349 ar9 ar10 ar11 -0.2100 -0.2552 -0.4071 s.e. 0.1255 0.1136 0.1141 sigma^2 estimated as 29287192: log likelihood = -593.32, aic = 1208.63 [[3]][[4]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, fixed = last.arma$next.vector, method = "ML") Coefficients: ar1 ar2 ar3 ar4 ar5 ar6 ar7 ar8 ar9 0 -0.1481 -0.1881 -0.2293 -0.2114 -0.4594 0 -0.1268 -0.1759 s.e. 0 0.1294 0.1269 0.1234 0.1380 0.1211 0 0.1322 0.1289 ar10 ar11 -0.2292 -0.3860 s.e. 0.1167 0.1159 sigma^2 estimated as 30325956: log likelihood = -593.98, aic = 1207.95 [[3]][[5]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, fixed = last.arma$next.vector, method = "ML") Coefficients: ar1 ar2 ar3 ar4 ar5 ar6 ar7 ar8 ar9 0 -0.0779 -0.1464 -0.2038 -0.1829 -0.4402 0 0 -0.1320 s.e. 0 0.1087 0.1231 0.1220 0.1353 0.1204 0 0 0.1256 ar10 ar11 -0.2105 -0.3657 s.e. 0.1210 0.1168 sigma^2 estimated as 31010710: log likelihood = -594.43, aic = 1206.85 [[3]][[6]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, fixed = last.arma$next.vector, method = "ML") Coefficients: ar1 ar2 ar3 ar4 ar5 ar6 ar7 ar8 ar9 ar10 0 0 -0.1190 -0.1950 -0.1750 -0.4289 0 0 -0.1190 -0.2074 s.e. 0 0 0.1205 0.1288 0.1387 0.1204 0 0 0.1251 0.1235 ar11 -0.3633 s.e. 0.1193 sigma^2 estimated as 31350627: log likelihood = -594.68, aic = 1205.36 [[3]][[7]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, fixed = last.arma$next.vector, method = "ML") Coefficients: ar1 ar2 ar3 ar4 ar5 ar6 ar7 ar8 ar9 ar10 0 0 -0.0690 -0.1744 -0.1658 -0.4196 0 0 0 -0.1749 s.e. 0 0 0.1121 0.1308 0.1396 0.1211 0 0 0 0.1270 ar11 -0.3592 s.e. 0.1244 sigma^2 estimated as 32063028: log likelihood = -595.12, aic = 1204.24 [[3]][[8]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, fixed = last.arma$next.vector, method = "ML") Coefficients: ar1 ar2 ar3 ar4 ar5 ar6 ar7 ar8 ar9 ar10 ar11 0 0 0 -0.1503 -0.1569 -0.4120 0 0 0 -0.1718 -0.3579 s.e. 0 0 0 0.1300 0.1419 0.1211 0 0 0 0.1287 0.1266 sigma^2 estimated as 32333574: log likelihood = -595.3, aic = 1202.61 [[3]][[9]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, fixed = last.arma$next.vector, method = "ML") Coefficients: ar1 ar2 ar3 ar4 ar5 ar6 ar7 ar8 ar9 ar10 ar11 0 0 0 -0.0964 0 -0.3572 0 0 0 -0.1505 -0.3008 s.e. 0 0 0 0.1241 0 0.1126 0 0 0 0.1318 0.1205 sigma^2 estimated as 33336966: log likelihood = -595.9, aic = 1201.8 [[3]][[10]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, fixed = last.arma$next.vector, method = "ML") Coefficients: ar1 ar2 ar3 ar4 ar5 ar6 ar7 ar8 ar9 ar10 ar11 0 0 0 0 0 -0.3557 0 0 0 -0.1088 -0.2977 s.e. 0 0 0 0 0 0.1135 0 0 0 0.1216 0.1209 sigma^2 estimated as 33732618: log likelihood = -596.2, aic = 1200.4 [[3]][[11]] NULL $aic [1] 1138.252 1208.630 1207.955 1206.854 1205.364 1204.236 1202.609 1201.796 [9] 1200.397 1199.173 Warning messages: 1: In arima(series, order = order, seasonal = seasonal, include.mean = include.mean, : some AR parameters were fixed: setting transform.pars = FALSE 2: In arima(series, order = order, seasonal = seasonal, include.mean = include.mean, : some AR parameters were fixed: setting transform.pars = FALSE 3: In arima(series, order = order, seasonal = seasonal, include.mean = include.mean, : some AR parameters were fixed: setting transform.pars = FALSE 4: In arima(series, order = order, seasonal = seasonal, include.mean = include.mean, : some AR parameters were fixed: setting transform.pars = FALSE 5: In arima(series, order = order, seasonal = seasonal, include.mean = include.mean, : some AR parameters were fixed: setting transform.pars = FALSE 6: In arima(series, order = order, seasonal = seasonal, include.mean = include.mean, : some AR parameters were fixed: setting transform.pars = FALSE 7: In arima(series, order = order, seasonal = seasonal, include.mean = include.mean, : some AR parameters were fixed: setting transform.pars = FALSE 8: In arima(series, order = order, seasonal = seasonal, include.mean = include.mean, : some AR parameters were fixed: setting transform.pars = FALSE 9: In arima(series, order = order, seasonal = seasonal, include.mean = include.mean, : some AR parameters were fixed: setting transform.pars = FALSE > postscript(file="/var/www/html/rcomp/tmp/1kmgv1260549924.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > resid <- arimaSelectplot(selection) > dev.off() null device 1 > resid Time Series: Start = 1 End = 60 Frequency = 1 [1] 20.36599 2087.18529 -3121.17113 -4584.96228 13700.06284 -3815.00875 [7] 3290.65694 -1123.25004 -5305.17245 1138.17470 -2517.12213 -627.17156 [13] 2526.90156 -2487.69651 -2618.59653 -1838.94103 17175.55265 -1420.73128 [19] 4117.71188 -8013.93701 -499.94106 -8431.23274 2358.09572 -1405.57644 [25] 2543.61939 -1056.69592 -3768.93098 -3037.02700 19603.10487 -4178.25820 [31] 2180.15716 -4258.49908 -3552.70990 -3910.62393 2228.24068 -2792.15524 [37] 3631.88605 699.88986 -5250.68521 -856.08988 16006.14668 -1371.34459 [43] -983.43197 3310.96896 -8254.45839 -3291.82682 -258.42687 -1943.36098 [49] 3453.85466 432.37459 -9176.63680 1742.02855 11136.41009 -2035.48057 [55] 4572.99171 -2588.60358 -8570.86897 -1438.68243 805.11546 -1509.43147 > postscript(file="/var/www/html/rcomp/tmp/2aou91260549924.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > acf(resid,length(resid)/2, main='Residual Autocorrelation Function') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/3cm821260549924.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > pacf(resid,length(resid)/2, main='Residual Partial Autocorrelation Function') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/461qa1260549924.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > cpgram(resid, main='Residual Cumulative Periodogram') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/5wa8u1260549924.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > hist(resid, main='Residual Histogram', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/64tzd1260549924.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~resid,col='black',main='Residual Density Plot', xlab='values of Residuals') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/7r38o1260549924.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > qqnorm(resid, main='Residual Normal Q-Q Plot') > qqline(resid) > dev.off() null device 1 > ncols <- length(selection[[1]][1,]) > nrows <- length(selection[[2]][,1])-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,'ARIMA Parameter Estimation and Backward Selection', ncols+1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Iteration', header=TRUE) > for (i in 1:ncols) { + a<-table.element(a,names(selection[[3]][[1]]$coef)[i],header=TRUE) + } > a<-table.row.end(a) > for (j in 1:nrows) { + a<-table.row.start(a) + mydum <- 'Estimates (' + mydum <- paste(mydum,j) + mydum <- paste(mydum,')') + a<-table.element(a,mydum, header=TRUE) + for (i in 1:ncols) { + a<-table.element(a,round(selection[[1]][j,i],4)) + } + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a,'(p-val)', header=TRUE) + for (i in 1:ncols) { + mydum <- '(' + mydum <- paste(mydum,round(selection[[2]][j,i],4),sep='') + mydum <- paste(mydum,')') + a<-table.element(a,mydum) + } + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/8600j1260549924.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Estimated ARIMA Residuals', 1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Value', 1,TRUE) > a<-table.row.end(a) > for (i in (par4*par5+par3):length(resid)) { + a<-table.row.start(a) + a<-table.element(a,resid[i]) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/9zcvt1260549924.tab") > > system("convert tmp/1kmgv1260549924.ps tmp/1kmgv1260549924.png") > system("convert tmp/2aou91260549924.ps tmp/2aou91260549924.png") > system("convert tmp/3cm821260549924.ps tmp/3cm821260549924.png") > system("convert tmp/461qa1260549924.ps tmp/461qa1260549924.png") > system("convert tmp/5wa8u1260549924.ps tmp/5wa8u1260549924.png") > system("convert tmp/64tzd1260549924.ps tmp/64tzd1260549924.png") > system("convert tmp/7r38o1260549924.ps tmp/7r38o1260549924.png") > > > proc.time() user system elapsed 2.916 1.058 3.300