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(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.5286779 -0.02770611 -0.2422811 -0.3068963 0.04011278 -0.09321648 [2,] -0.5163847 0.00000000 -0.2304187 -0.3024023 0.05012193 -0.08701499 [3,] -0.5229841 0.00000000 -0.2240889 -0.2982115 0.04994993 -0.07708049 [4,] -0.5282127 0.00000000 -0.2249683 -0.3201316 0.00000000 -0.09794165 [5,] -0.5284096 0.00000000 -0.2248605 -0.3270315 0.00000000 -0.09767117 [6,] -0.5430023 0.00000000 -0.2022418 -0.3375803 0.00000000 0.00000000 [7,] -0.5163519 0.00000000 -0.1819844 -0.2844980 0.00000000 0.00000000 [8,] -0.5465526 0.00000000 0.0000000 -0.1996873 0.00000000 0.00000000 [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.1540699 0.09074996 0.2193135 -0.03060700 [2,] -0.1528989 0.09599032 0.2216248 -0.03321198 [3,] -0.1430536 0.09701570 0.2376891 0.00000000 [4,] -0.1507650 0.08151032 0.2279811 0.00000000 [5,] -0.1830126 0.00000000 0.1993279 0.00000000 [6,] -0.1430737 0.00000000 0.2171996 0.00000000 [7,] 0.0000000 0.00000000 0.1794611 0.00000000 [8,] 0.0000000 0.00000000 0.1949212 0.00000000 [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.79811 0.02517 0.00538 0.71947 0.40365 0.16351 0.39652 0.04198 [2,] 0 NA 0.01827 0.00541 0.63182 0.42428 0.16620 0.36086 0.03920 [3,] 0 NA 0.01930 0.00575 0.63265 0.46228 0.17917 0.35600 0.01381 [4,] 0 NA 0.01889 0.00110 NA 0.30482 0.15282 0.41496 0.01566 [5,] 0 NA 0.01940 0.00088 NA 0.30771 0.06262 NA 0.02279 [6,] 0 NA 0.03052 0.00060 NA NA 0.11292 NA 0.01156 [7,] 0 NA 0.05213 0.00214 NA NA NA NA 0.03089 [8,] 0 NA NA 0.01546 NA NA NA NA 0.02087 [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.75744 [2,] 0.73623 [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.5287 -0.0277 -0.2423 -0.3069 0.0401 -0.0932 -0.1541 0.0907 s.e. 0.0971 0.1080 0.1067 0.1080 0.1114 0.1112 0.1098 0.1066 ar9 ar10 0.2193 -0.0306 s.e. 0.1065 0.0988 sigma^2 estimated as 93527: log likelihood = -750.58, aic = 1523.17 [[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.5287 -0.0277 -0.2423 -0.3069 0.0401 -0.0932 -0.1541 0.0907 s.e. 0.0971 0.1080 0.1067 0.1080 0.1114 0.1112 0.1098 0.1066 ar9 ar10 0.2193 -0.0306 s.e. 0.1065 0.0988 sigma^2 estimated as 93527: log likelihood = -750.58, aic = 1523.17 [[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.5164 0 -0.2304 -0.3024 0.0501 -0.0870 -0.1529 0.0960 0.2216 s.e. 0.0844 0 0.0961 0.1065 0.1043 0.1085 0.1097 0.1046 0.1062 ar10 -0.0332 s.e. 0.0983 sigma^2 estimated as 93586: log likelihood = -750.62, aic = 1521.23 [[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.5230 0 -0.2241 -0.2982 0.0499 -0.0771 -0.1431 0.0970 0.2377 s.e. 0.0822 0 0.0944 0.1059 0.1042 0.1045 0.1058 0.1047 0.0950 ar10 0 s.e. 0 sigma^2 estimated as 93706: log likelihood = -750.67, aic = 1519.35 [[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.5282 0 -0.2250 -0.3201 0 -0.0979 -0.1508 0.0815 0.2280 s.e. 0.0816 0 0.0944 0.0955 0 0.0950 0.1047 0.0996 0.0929 ar10 0 s.e. 0 sigma^2 estimated as 93914: log likelihood = -750.79, aic = 1517.58 [[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.5284 0 -0.2249 -0.3270 0 -0.0977 -0.1830 0 0.1993 0 s.e. 0.0818 0 0.0948 0.0957 0 0.0953 0.0973 0 0.0863 0 sigma^2 estimated as 94554: log likelihood = -751.12, aic = 1516.24 [[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.543 0 -0.2022 -0.3376 0 0 -0.1431 0 0.2172 0 s.e. 0.081 0 0.0923 0.0956 0 0 0.0895 0 0.0846 0 sigma^2 estimated as 95509: log likelihood = -751.64, aic = 1515.29 [[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 -0.5164 0 -0.1820 -0.2845 0 0 0 0 0.1795 0 s.e. 0.0798 0 0.0927 0.0905 0 0 0 0 0.0821 0 sigma^2 estimated as 97976: log likelihood = -752.9, aic = 1515.79 [[3]][[9]] NULL [[3]][[10]] NULL $aic [1] 1523.166 1521.232 1519.346 1517.575 1516.241 1515.286 1515.791 1517.573 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 > postscript(file="/var/www/html/rcomp/tmp/1uaj81260380666.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 = 118 Frequency = 1 [1] 0.28867506 0.10787550 0.09048213 0.12555971 -0.01489469 [6] 0.08272096 0.10751741 0.03813064 0.13518636 0.06075573 [11] 0.01900574 -0.26569916 -1.42512915 44.81756370 -20.82688723 [16] -47.40570321 78.75799722 5.47036066 -26.87177827 31.39403586 [21] -59.65605289 154.77873897 40.84741634 -139.06557985 -19.28071069 [26] 120.03993448 -0.30505156 925.75600085 669.88133762 89.25154871 [31] 180.88782908 -67.85832543 -278.64862954 69.01048791 -18.02714725 [36] 117.10586080 174.13418195 -170.72695036 -313.60359123 -595.99444476 [41] -726.04630185 -474.42828901 -203.24319094 -11.51537091 -154.18106087 [46] 91.01402690 377.77189952 -194.01214563 116.83040597 79.97357605 [51] 395.47060080 -706.62495384 -201.64173740 826.97232344 147.23430024 [56] -227.59140765 286.38815811 230.42638947 -426.49611583 -386.28955724 [61] -40.13154078 247.07448760 118.31303979 -77.13138295 -170.07764713 [66] 46.11241817 325.11380400 95.61000130 -73.10016277 -323.64737917 [71] 77.34991601 552.24282328 74.42406764 -93.79114114 -239.36577303 [76] -119.23452601 634.13927281 -315.01825977 -321.90693632 -71.75895802 [81] 153.57775952 -71.60609341 -63.03855634 153.26707438 -156.57560669 [86] -60.07351465 -188.92199215 -12.79526189 369.04044009 191.31459143 [91] -137.20502027 -173.04861310 -56.24429209 202.54141112 176.97954600 [96] -562.07931156 501.01443260 -296.47774125 757.39417481 -609.14993681 [101] -518.87516681 -112.88357239 -63.12878448 380.70298707 -174.04054005 [106] -122.70855462 159.91825541 -176.81835834 134.52023750 278.38928168 [111] -527.15000010 863.59884994 -404.12670535 61.23881542 311.96809070 [116] -123.51538069 -27.78412039 -99.25137094 > postscript(file="/var/www/html/rcomp/tmp/2yw3o1260380666.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/3sgy51260380666.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/4sf9r1260380666.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/5fepq1260380666.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/6cizs1260380666.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/75nle1260380666.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/8nfdf1260380666.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/9vvc31260380666.tab") > system("convert tmp/1uaj81260380666.ps tmp/1uaj81260380666.png") > system("convert tmp/2yw3o1260380666.ps tmp/2yw3o1260380666.png") > system("convert tmp/3sgy51260380666.ps tmp/3sgy51260380666.png") > system("convert tmp/4sf9r1260380666.ps tmp/4sf9r1260380666.png") > system("convert tmp/5fepq1260380666.ps tmp/5fepq1260380666.png") > system("convert tmp/6cizs1260380666.ps tmp/6cizs1260380666.png") > system("convert tmp/75nle1260380666.ps tmp/75nle1260380666.png") > > > proc.time() user system elapsed 5.773 1.077 6.200