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(9.5,9.6,9.5,9.1,8.9,9,10.1,10.3,10.2,9.6,9.2,9.3,9.4,9.4,9.2,9,9,9,9.8,10,9.8,9.3,9,9,9.1,9.1,9.1,9.2,8.8,8.3,8.4,8.1,7.7,7.9,7.9,8,7.9,7.6,7.1,6.8,6.5,6.9,8.2,8.7,8.3,7.9,7.5,7.8,8.3,8.4,8.2,7.7,7.2,7.3,8.1,8.5) > 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.4039860 -0.3142383 -0.1806737 -0.1963439 0.02831786 0.05672957 [2,] 0.4042381 -0.3135544 -0.1829864 -0.1958055 0.02543567 0.06135135 [3,] 0.3994466 -0.3152589 -0.1875412 -0.1870186 0.00000000 0.07009560 [4,] 0.3999534 -0.3345971 -0.2012713 -0.2017758 0.00000000 0.00000000 [5,] 0.3926325 -0.3282123 -0.1904546 -0.2003467 0.00000000 0.00000000 [6,] 0.3945758 -0.3399313 -0.1989322 -0.1826504 0.00000000 0.00000000 [7,] 0.4445061 -0.2930116 -0.2699332 0.0000000 0.00000000 0.00000000 [8,] 0.4170184 -0.3159192 -0.2894103 0.0000000 0.00000000 0.00000000 [9,] 0.4426314 -0.3139941 -0.3205998 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.01058976 -0.07817323 0.09338539 -0.2040513 0.1843136 [2,] 0.00000000 -0.07351045 0.08976067 -0.2031798 0.1821780 [3,] 0.00000000 -0.07577594 0.08506315 -0.2011552 0.1840580 [4,] 0.00000000 -0.09146231 0.07742446 -0.2205921 0.1852236 [5,] 0.00000000 -0.05999604 0.00000000 -0.1772537 0.1641096 [6,] 0.00000000 0.00000000 0.00000000 -0.1764086 0.1851289 [7,] 0.00000000 0.00000000 0.00000000 -0.2051928 0.1720103 [8,] 0.00000000 0.00000000 0.00000000 -0.1374250 0.0000000 [9,] 0.00000000 0.00000000 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.00373 0.03352 0.22821 0.19947 0.85837 0.74314 0.95151 0.64422 0.58337 [2,] 0.00367 0.03324 0.20646 0.19954 0.86656 0.69321 NA 0.62696 0.57423 [3,] 0.00330 0.03179 0.18777 0.19190 NA 0.63254 NA 0.61499 0.58845 [4,] 0.00324 0.01803 0.15002 0.15166 NA NA NA 0.53412 0.62100 [5,] 0.00374 0.02056 0.16938 0.15636 NA NA NA 0.65145 NA [6,] 0.00363 0.01513 0.14862 0.17794 NA NA NA NA NA [7,] 0.00088 0.03105 0.03835 NA NA NA NA NA NA [8,] 0.00187 0.02285 0.02997 NA NA NA NA NA NA [9,] 0.00099 0.02490 0.01688 NA NA NA NA NA 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.20582 0.20380 [2,] 0.20623 0.19578 [3,] 0.20920 0.18985 [4,] 0.15540 0.18836 [5,] 0.16817 0.22169 [6,] 0.17087 0.14385 [7,] 0.11314 0.17980 [8,] 0.25981 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.4040 -0.3142 -0.1807 -0.1963 0.0283 0.0567 0.0106 -0.0782 s.e. 0.1319 0.1432 0.1478 0.1507 0.1578 0.1720 0.1731 0.1681 ar9 ar10 ar11 0.0934 -0.2041 0.1843 s.e. 0.1690 0.1589 0.1429 sigma^2 estimated as 0.07813: log likelihood = -8.99, aic = 41.98 [[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.4040 -0.3142 -0.1807 -0.1963 0.0283 0.0567 0.0106 -0.0782 s.e. 0.1319 0.1432 0.1478 0.1507 0.1578 0.1720 0.1731 0.1681 ar9 ar10 ar11 0.0934 -0.2041 0.1843 s.e. 0.1690 0.1589 0.1429 sigma^2 estimated as 0.07813: log likelihood = -8.99, aic = 41.98 [[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.4042 -0.3136 -0.1830 -0.1958 0.0254 0.0614 0 -0.0735 0.0898 s.e. 0.1319 0.1427 0.1428 0.1504 0.1505 0.1545 0 0.1502 0.1586 ar10 ar11 -0.2032 0.1822 s.e. 0.1584 0.1387 sigma^2 estimated as 0.07815: log likelihood = -8.99, aic = 39.99 [[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.3994 -0.3153 -0.1875 -0.1870 0 0.0701 0 -0.0758 0.0851 s.e. 0.1288 0.1424 0.1403 0.1412 0 0.1456 0 0.1496 0.1561 ar10 ar11 -0.2012 0.1841 s.e. 0.1579 0.1383 sigma^2 estimated as 0.07818: log likelihood = -9.01, aic = 38.01 [[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.4000 -0.3346 -0.2013 -0.2018 0 0 0 -0.0915 0.0774 s.e. 0.1289 0.1365 0.1375 0.1385 0 0 0 0.1460 0.1556 ar10 ar11 -0.2206 0.1852 s.e. 0.1528 0.1388 sigma^2 estimated as 0.07855: log likelihood = -9.12, aic = 36.25 [[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.3926 -0.3282 -0.1905 -0.2003 0 0 0 -0.060 0 -0.1773 s.e. 0.1288 0.1370 0.1365 0.1391 0 0 0 0.132 0 0.1267 ar11 0.1641 s.e. 0.1325 sigma^2 estimated as 0.07901: log likelihood = -9.25, aic = 34.49 [[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.3946 -0.3399 -0.1989 -0.1827 0 0 0 0 0 -0.1764 s.e. 0.1291 0.1350 0.1356 0.1336 0 0 0 0 0 0.1269 ar11 0.1851 s.e. 0.1246 sigma^2 estimated as 0.07936: log likelihood = -9.35, aic = 32.7 [[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.4445 -0.293 -0.2699 0 0 0 0 0 0 -0.2052 0.1720 s.e. 0.1256 0.132 0.1269 0 0 0 0 0 0 0.1272 0.1264 sigma^2 estimated as 0.0822: log likelihood = -10.26, aic = 32.52 [[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.4170 -0.3159 -0.2894 0 0 0 0 0 0 -0.1374 0 s.e. 0.1271 0.1346 0.1296 0 0 0 0 0 0 0.1206 0 sigma^2 estimated as 0.08564: log likelihood = -11.14, aic = 32.29 [[3]][[10]] NULL [[3]][[11]] NULL $aic [1] 41.98250 39.98622 38.01475 36.24552 34.49109 32.69710 32.52283 32.28966 [9] 31.55377 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 > postscript(file="/var/www/html/rcomp/tmp/1zry51260533598.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 = 56 Frequency = 1 [1] 0.009499991 0.073520053 -0.112398431 -0.269065743 -0.022600447 [6] 0.028266929 0.852871975 -0.308118790 0.192149910 -0.154257009 [11] -0.090823714 0.062057292 -0.255458231 -0.180844054 -0.166952050 [16] -0.073912782 0.171387369 -0.093580905 0.728375435 -0.216069756 [21] -0.085638299 -0.108141714 -0.083050073 -0.090736159 -0.166965936 [26] -0.156009942 0.031591925 0.128941031 -0.331761817 -0.274115701 [31] 0.183597537 -0.684138106 -0.429235214 0.300972625 -0.282851973 [36] 0.047419725 -0.083819780 -0.212963730 -0.432515380 -0.283920110 [41] -0.405934687 0.244397087 0.896623752 0.024905664 -0.082050065 [46] 0.314742899 -0.228597678 0.183448036 0.064050135 -0.170725070 [51] -0.038146635 -0.185329223 -0.147081067 0.161380041 0.400663366 [56] -0.101697980 > postscript(file="/var/www/html/rcomp/tmp/2ngkb1260533598.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/3dduc1260533598.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/46j3k1260533598.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/5m50o1260533598.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/6gh551260533598.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/7kh3p1260533598.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/8o40n1260533598.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/9rchp1260533598.tab") > > system("convert tmp/1zry51260533598.ps tmp/1zry51260533598.png") > system("convert tmp/2ngkb1260533598.ps tmp/2ngkb1260533598.png") > system("convert tmp/3dduc1260533598.ps tmp/3dduc1260533598.png") > system("convert tmp/46j3k1260533598.ps tmp/46j3k1260533598.png") > system("convert tmp/5m50o1260533598.ps tmp/5m50o1260533598.png") > system("convert tmp/6gh551260533598.ps tmp/6gh551260533598.png") > system("convert tmp/7kh3p1260533598.ps tmp/7kh3p1260533598.png") > > > proc.time() user system elapsed 2.807 1.025 3.551