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(423.4,404.1,500,472.6,496.1,562,434.8,538.2,577.6,518.1,625.2,561.2,523.3,536.1,607.3,637.3,606.9,652.9,617.2,670.4,729.9,677.2,710,844.3,748.2,653.9,742.6,854.2,808.4,1819,1936.5,1966.1,2083.1,1620.1,1527.6,1795,1685.1,1851.8,2164.4,1981.8,1726.5,2144.6,1758.2,1672.9,1837.3,1596.1,1446,1898.4,1964.1,1755.9,2255.3,1881.2,2117.9,1656.5,1544.1,2098.9,2133.3,1963.5,1801.2,2365.4,1936.5,1667.6,1983.5,2058.6,2448.3,1858.1,1625.4,2130.6,2515.7,2230.2,2086.9,2235,2100.2,2288.6,2490,2573.7,2543.8,2004.7,2390,2338.4,2724.5,2292.5,2386,2477.9,2337,2605.1,2560.8,2839.3,2407.2,2085.2,2735.6,2798.7,3053.2,2405,2471.9,2727.3,2790.7,2385.4,3206.6,2705.6,3518.4,1954.9,2584.3,2535.8,2685.9,2866,2236.6,2934.9,2668.6,2371.2,3165.9,2887.2,3112.2,2671.2,2432.6,2812.3,3095.7,2862.9,2607.3,2862.5) > par9 = '0' > par8 = '0' > par7 = '0' > par6 = '3' > par5 = '12' > par4 = '1' > par3 = '1' > par2 = '1' > par1 = 'FALSE' > #'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) > 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 <- 10 > 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.5287982 -0.02764627 -0.2424722 -0.3071220 0.04025480 -0.09329985 [2,] -0.5165306 0.00000000 -0.2306282 -0.3026346 0.05023823 -0.08710531 [3,] -0.5230984 0.00000000 -0.2243060 -0.2984734 0.05003720 -0.07721374 [4,] -0.5283285 0.00000000 -0.2252060 -0.3204415 0.00000000 -0.09812161 [5,] -0.5285483 0.00000000 -0.2250800 -0.3273333 0.00000000 -0.09784643 [6,] -0.5431930 0.00000000 -0.2024435 -0.3379392 0.00000000 0.00000000 [7,] -0.5165470 0.00000000 -0.1821847 -0.2848161 0.00000000 0.00000000 [8,] NA NA NA NA NA NA [9,] NA NA NA NA NA NA [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 [,7] [,8] [,9] [,10] [1,] -0.1542161 0.09088492 0.2195667 -0.03045446 [2,] -0.1530411 0.09611726 0.2218860 -0.03305943 [3,] -0.1432414 0.09713476 0.2378803 0.00000000 [4,] -0.1509661 0.08159823 0.2281552 0.00000000 [5,] -0.1832368 0.00000000 0.1994879 0.00000000 [6,] -0.1432348 0.00000000 0.2173373 0.00000000 [7,] 0.0000000 0.00000000 0.1795919 0.00000000 [8,] NA NA NA NA [9,] NA NA NA NA [10,] NA NA NA NA [11,] NA NA NA NA [12,] NA NA NA NA [13,] NA NA NA NA [14,] NA NA NA NA [15,] NA NA NA NA [16,] NA NA NA NA [17,] NA NA NA NA [18,] NA NA NA NA [19,] NA NA NA NA [20,] NA NA NA NA [[2]] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [1,] 0 0.79666 0.02373 0.00493 0.71603 0.39898 0.15938 0.39168 0.03977 [2,] 0 NA 0.01710 0.00496 0.62791 0.41960 0.16205 0.35602 0.03708 [3,] 0 NA 0.01806 0.00528 0.62895 0.45745 0.17477 0.35119 0.01282 [4,] 0 NA 0.01766 0.00098 NA 0.29953 0.14866 0.41037 0.01457 [5,] 0 NA 0.01816 0.00078 NA 0.30244 0.06003 NA 0.02134 [6,] 0 NA 0.02883 0.00052 NA NA 0.10941 NA 0.01071 [7,] 0 NA 0.04970 0.00192 NA NA NA NA 0.02914 [8,] NA NA NA NA NA NA NA NA NA [9,] NA NA NA 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 [,10] [1,] 0.75633 [2,] 0.73493 [3,] NA [4,] NA [5,] NA [6,] NA [7,] NA [8,] NA [9,] NA [10,] NA [11,] NA [12,] NA [13,] NA [14,] NA [15,] NA [16,] NA [17,] NA [18,] NA [19,] NA [20,] 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.5288 -0.0276 -0.2425 -0.3071 0.0403 -0.0933 -0.1542 0.0909 s.e. 0.0962 0.1070 0.1057 0.1070 0.1104 0.1102 0.1088 0.1057 ar9 ar10 0.2196 -0.0305 s.e. 0.1055 0.0979 sigma^2 estimated as 91781: log likelihood = -763.86, aic = 1549.72 [[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.5288 -0.0276 -0.2425 -0.3071 0.0403 -0.0933 -0.1542 0.0909 s.e. 0.0962 0.1070 0.1057 0.1070 0.1104 0.1102 0.1088 0.1057 ar9 ar10 0.2196 -0.0305 s.e. 0.1055 0.0979 sigma^2 estimated as 91781: log likelihood = -763.86, aic = 1549.72 [[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.5165 0 -0.2306 -0.3026 0.0502 -0.0871 -0.1530 0.0961 0.2219 s.e. 0.0837 0 0.0953 0.1055 0.1034 0.1075 0.1087 0.1037 0.1051 ar10 -0.0331 s.e. 0.0974 sigma^2 estimated as 91838: log likelihood = -763.89, aic = 1547.79 [[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.5231 0 -0.2243 -0.2985 0.0500 -0.0772 -0.1432 0.0971 0.2379 s.e. 0.0815 0 0.0935 0.1049 0.1033 0.1036 0.1049 0.1038 0.0940 ar10 0 s.e. 0 sigma^2 estimated as 91955: log likelihood = -763.95, aic = 1545.9 [[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.5283 0 -0.2252 -0.3204 0 -0.0981 -0.1510 0.0816 0.2282 s.e. 0.0808 0 0.0935 0.0946 0 0.0941 0.1038 0.0987 0.0919 ar10 0 s.e. 0 sigma^2 estimated as 92159: log likelihood = -764.07, aic = 1544.13 [[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.5285 0 -0.2251 -0.3273 0 -0.0978 -0.1832 0 0.1995 0 s.e. 0.0811 0 0.0939 0.0948 0 0.0945 0.0965 0 0.0855 0 sigma^2 estimated as 92787: log likelihood = -764.41, aic = 1542.81 [[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.5432 0 -0.2024 -0.3379 0 0 -0.1432 0 0.2173 0 s.e. 0.0803 0 0.0914 0.0947 0 0 0.0888 0 0.0838 0 sigma^2 estimated as 93727: log likelihood = -764.94, aic = 1541.88 [[3]][[8]] NULL [[3]][[9]] NULL [[3]][[10]] NULL $aic [1] 1549.719 1547.785 1545.900 1544.135 1542.814 1541.882 1542.437 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 > postscript(file="/var/www/html/rcomp/tmp/15krz1260376052.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 = 120 Frequency = 1 [1] 2.444500e-01 9.437170e-02 1.428310e-01 8.229539e-02 8.690553e-02 [6] 1.329289e-01 -4.583217e-03 9.311941e-02 1.200074e-01 5.137904e-02 [11] 1.490356e-01 -1.954143e-01 -1.409306e+00 2.502017e+01 -6.797855e+00 [16] 4.069580e+01 -2.063579e+01 -4.263490e+01 8.081576e+01 6.534450e+00 [21] -2.142807e+01 2.709970e+01 -4.860236e+01 1.426932e+02 4.235883e+01 [26] -1.266369e+02 -2.850568e+01 1.293297e+02 -5.408846e-01 9.085735e+02 [31] 7.265228e+02 9.188726e+01 1.763150e+02 -6.920296e+00 -2.662127e+02 [36] 6.269384e+01 1.152975e+02 1.147719e+02 1.372510e+02 -1.554532e+02 [41] -3.747733e+02 -6.032139e+02 -7.013981e+02 -5.051928e+02 -1.973022e+02 [46] -1.962336e+01 -2.295328e+02 4.580919e+01 3.160850e+02 -2.428650e+02 [51] 1.134584e+02 1.243419e+02 4.281661e+02 -7.196781e+02 -2.010861e+02 [56] 8.614924e+02 1.120087e+02 -2.523712e+02 3.028137e+02 3.250432e+02 [61] -5.477036e+02 -3.753878e+02 8.487125e+01 2.090062e+02 8.867863e+01 [66] -7.684639e+01 -1.608417e+02 -3.624125e-01 3.163949e+02 8.812868e+01 [71] -1.700925e+01 -2.897479e+02 4.709341e+01 5.313162e+02 7.697484e+01 [76] -5.829533e+01 -2.287556e+02 -1.189627e+02 5.743501e+02 -2.651498e+02 [81] -2.769689e+02 -8.389731e+01 1.551916e+02 -1.507502e+02 -6.049728e+01 [86] 2.545309e+02 -2.246199e+02 -9.306079e+01 -1.822832e+02 9.521838e+00 [91] 3.632216e+02 1.907690e+02 -1.376342e+02 -1.945169e+02 -2.065001e+01 [96] 1.569618e+02 1.936300e+02 -5.154885e+02 4.930693e+02 -2.892200e+02 [101] 6.983006e+02 -5.928409e+02 -4.902852e+02 -9.936468e+01 -1.276424e+02 [106] 4.273556e+02 -2.413593e+02 -3.966750e+00 3.487163e+01 -2.058082e+02 [111] 1.403049e+02 2.804434e+02 -4.137268e+02 7.572657e+02 -3.387998e+02 [116] 1.694350e+01 3.136938e+02 -6.901624e+01 -4.873886e+01 -1.467972e+02 > postscript(file="/var/www/html/rcomp/tmp/2b11d1260376052.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/358my1260376052.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/4qxr81260376052.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/51kdd1260376052.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/6jdt91260376052.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/7py2l1260376052.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/8njq21260376052.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/9eqp31260376052.tab") > system("convert tmp/15krz1260376052.ps tmp/15krz1260376052.png") > system("convert tmp/2b11d1260376052.ps tmp/2b11d1260376052.png") > system("convert tmp/358my1260376052.ps tmp/358my1260376052.png") > system("convert tmp/4qxr81260376052.ps tmp/4qxr81260376052.png") > system("convert tmp/51kdd1260376052.ps tmp/51kdd1260376052.png") > system("convert tmp/6jdt91260376052.ps tmp/6jdt91260376052.png") > system("convert tmp/7py2l1260376052.ps tmp/7py2l1260376052.png") > > > proc.time() user system elapsed 5.650 1.112 6.017