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(6.3,6.2,6.1,6.3,6.5,6.6,6.5,6.2,6.2,5.9,6.1,6.1,6.1,6.1,6.1,6.4,6.7,6.9,7,7,6.8,6.4,5.9,5.5,5.5,5.6,5.8,5.9,6.1,6.1,6,6,5.9,5.5,5.6,5.4,5.2,5.2,5.2,5.5,5.8,5.8,5.5,5.3,5.1,5.2,5.8,5.8,5.5,5,4.9,5.3,6.1,6.5,6.8,6.6,6.4,6.4) > 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.4588893 0.07037521 -0.3563351 -0.3043759 0.13520493 0.10164144 [2,] 0.4836776 0.00000000 -0.3315074 -0.2883673 0.12192440 0.07430155 [3,] 0.4669271 0.00000000 -0.3163510 -0.2895525 0.09857993 0.07195351 [4,] 0.4649780 0.00000000 -0.3380232 -0.2827356 0.12950291 0.00000000 [5,] 0.4561212 0.00000000 -0.3591418 -0.3145132 0.14771712 0.00000000 [6,] 0.4800752 0.00000000 -0.3406416 -0.3271121 0.16871154 0.00000000 [7,] 0.4574515 0.00000000 -0.2872949 -0.3081285 0.11773829 0.00000000 [8,] 0.4198760 0.00000000 -0.3120525 -0.2651586 0.00000000 0.00000000 [9,] 0.5205360 0.00000000 -0.4304888 0.0000000 0.00000000 0.00000000 [10,] NA NA NA NA NA NA [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.2133978 -0.2106482 0.08101271 -0.1476866 0.1047377 [2,] -0.2094791 -0.1941638 0.07319658 -0.1641559 0.1081289 [3,] -0.2000769 -0.1720570 0.00000000 -0.1315977 0.1051775 [4,] -0.1820367 -0.1657652 0.00000000 -0.1569951 0.1115183 [5,] -0.2217338 -0.1951896 0.00000000 -0.1078801 0.0000000 [6,] -0.1778306 -0.2118817 0.00000000 0.0000000 0.0000000 [7,] 0.0000000 -0.2974204 0.00000000 0.0000000 0.0000000 [8,] 0.0000000 -0.3316581 0.00000000 0.0000000 0.0000000 [9,] 0.0000000 -0.2271018 0.00000000 0.0000000 0.0000000 [10,] NA NA NA NA NA [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.00104 0.62829 0.01623 0.05342 0.38992 0.52263 0.18535 0.17913 0.62263 [2,] 0.00023 NA 0.01682 0.06105 0.43157 0.61787 0.19365 0.20586 0.65721 [3,] 0.00019 NA 0.01854 0.06055 0.49840 0.63036 0.21141 0.23571 NA [4,] 0.00020 NA 0.00813 0.06602 0.32329 NA 0.24148 0.25253 NA [5,] 0.00025 NA 0.00431 0.03493 0.25850 NA 0.13162 0.16469 NA [6,] 0.00010 NA 0.00605 0.02895 0.19158 NA 0.19846 0.13148 NA [7,] 0.00019 NA 0.01475 0.04233 0.34469 NA NA 0.01949 NA [8,] 0.00025 NA 0.00770 0.06771 NA NA NA 0.00714 NA [9,] 0.00000 NA 0.00004 NA NA NA NA 0.04070 NA [10,] NA NA NA NA NA NA 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.37692 0.48987 [2,] 0.32014 0.47713 [3,] 0.37653 0.48972 [4,] 0.26004 0.46273 [5,] 0.38061 NA [6,] NA NA [7,] NA NA [8,] NA NA [9,] NA NA [10,] NA NA [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.4589 0.0704 -0.3563 -0.3044 0.1352 0.1016 -0.2134 -0.2106 s.e. 0.1311 0.1444 0.1428 0.1535 0.1558 0.1578 0.1587 0.1544 ar9 ar10 ar11 0.0810 -0.1477 0.1047 s.e. 0.1635 0.1655 0.1505 sigma^2 estimated as 0.03025: log likelihood = 17.47, aic = -10.94 [[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.4589 0.0704 -0.3563 -0.3044 0.1352 0.1016 -0.2134 -0.2106 s.e. 0.1311 0.1444 0.1428 0.1535 0.1558 0.1578 0.1587 0.1544 ar9 ar10 ar11 0.0810 -0.1477 0.1047 s.e. 0.1635 0.1655 0.1505 sigma^2 estimated as 0.03025: log likelihood = 17.47, aic = -10.94 [[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 ar9 0.4837 0 -0.3315 -0.2884 0.1219 0.0743 -0.2095 -0.1942 0.0732 s.e. 0.1211 0 0.1337 0.1503 0.1537 0.1480 0.1588 0.1514 0.1639 ar10 ar11 -0.1642 0.1081 s.e. 0.1634 0.1509 sigma^2 estimated as 0.03040: log likelihood = 17.35, aic = -12.71 [[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.4669 0 -0.3164 -0.2896 0.0986 0.0720 -0.2001 -0.1721 0 s.e. 0.1156 0 0.1298 0.1506 0.1445 0.1486 0.1580 0.1433 0 ar10 ar11 -0.1316 0.1052 s.e. 0.1474 0.1511 sigma^2 estimated as 0.03052: log likelihood = 17.25, aic = -14.51 [[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.4650 0 -0.3380 -0.2827 0.1295 0 -0.1820 -0.1658 0 s.e. 0.1157 0 0.1225 0.1504 0.1298 0 0.1535 0.1432 0 ar10 ar11 -0.1570 0.1115 s.e. 0.1378 0.1507 sigma^2 estimated as 0.03065: log likelihood = 17.14, aic = -16.27 [[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 0.4561 0 -0.3591 -0.3145 0.1477 0 -0.2217 -0.1952 0 s.e. 0.1158 0 0.1201 0.1451 0.1292 0 0.1447 0.1384 0 ar10 ar11 -0.1079 0 s.e. 0.1220 0 sigma^2 estimated as 0.03103: log likelihood = 16.87, aic = -17.73 [[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.4801 0 -0.3406 -0.3271 0.1687 0 -0.1778 -0.2119 0 0 s.e. 0.1140 0 0.1189 0.1455 0.1275 0 0.1365 0.1382 0 0 ar11 0 s.e. 0 sigma^2 estimated as 0.03154: log likelihood = 16.48, aic = -18.96 [[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.4575 0 -0.2873 -0.3081 0.1177 0 0 -0.2974 0 0 0 s.e. 0.1138 0 0.1139 0.1480 0.1235 0 0 0.1234 0 0 0 sigma^2 estimated as 0.03261: log likelihood = 15.65, aic = -19.31 [[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.4199 0 -0.3121 -0.2652 0 0 0 -0.3317 0 0 0 s.e. 0.1071 0 0.1126 0.1422 0 0 0 0.1185 0 0 0 sigma^2 estimated as 0.03314: log likelihood = 15.2, aic = -20.41 [[3]][[10]] NULL [[3]][[11]] NULL $aic [1] -10.94211 -12.70520 -14.50650 -16.27276 -17.73119 -18.95883 -19.30709 [8] -20.40671 -19.05733 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 log(s2) : NaNs produced 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/1zq9z1260558973.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 = 58 Frequency = 1 [1] 0.006299994 -0.073007782 -0.043333526 0.201681767 0.054567496 [6] -0.026496470 -0.085259027 -0.140090425 0.167467745 -0.337855198 [11] 0.172665388 -0.097191143 -0.027284122 0.016028733 0.019865903 [16] 0.200502576 0.174037211 -0.025460213 0.175972161 0.131175708 [21] -0.058041942 -0.231787850 -0.305533759 -0.152975086 0.089595115 [26] -0.095758036 -0.066222050 -0.090038615 0.122886034 -0.127712077 [31] -0.181592083 -0.001749288 -0.046968289 -0.356051842 0.307766146 [36] -0.240027034 -0.201030030 0.009117017 -0.069060444 0.184557797 [41] 0.087839692 -0.258626021 -0.173218454 0.032794478 -0.102808857 [46] 0.090359455 0.416054345 -0.267870358 -0.222329041 -0.160289879 [51] 0.169535691 0.282040243 0.330144202 -0.066519487 0.429349591 [56] 0.029742600 0.121425597 0.117825313 > postscript(file="/var/www/html/rcomp/tmp/2sgfp1260558973.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/3zzfx1260558973.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/4i2pq1260558973.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/5jemi1260558973.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/62yor1260558973.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/7f7nj1260558973.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/8huo61260558973.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/9xhml1260558973.tab") > > system("convert tmp/1zq9z1260558973.ps tmp/1zq9z1260558973.png") > system("convert tmp/2sgfp1260558973.ps tmp/2sgfp1260558973.png") > system("convert tmp/3zzfx1260558973.ps tmp/3zzfx1260558973.png") > system("convert tmp/4i2pq1260558973.ps tmp/4i2pq1260558973.png") > system("convert tmp/5jemi1260558973.ps tmp/5jemi1260558973.png") > system("convert tmp/62yor1260558973.ps tmp/62yor1260558973.png") > system("convert tmp/7f7nj1260558973.ps tmp/7f7nj1260558973.png") > > > proc.time() user system elapsed 2.999 1.056 4.565