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(153.3 + ,154.5 + ,155.2 + ,156.9 + ,157 + ,157.4 + ,157.2 + ,157.5 + ,158 + ,158.5 + ,159 + ,159.3 + ,160 + ,160.8 + ,161.9 + ,162.5 + ,162.7 + ,162.8 + ,162.9 + ,163 + ,164 + ,164.7 + ,164.8 + ,164.9 + ,165 + ,165.8 + ,166.1 + ,167.2 + ,167.7 + ,168.3 + ,168.6 + ,168.9 + ,169.1 + ,169.5 + ,169.6 + ,169.7 + ,169.8 + ,170.4 + ,170.9 + ,171.9 + ,171.9 + ,172 + ,172 + ,172.4 + ,173 + ,173.7 + ,173.8 + ,173.8 + ,173.9 + ,174.6 + ,175 + ,175.9 + ,176 + ,175.1 + ,175.6 + ,175.9 + ,176.7 + ,176.1 + ,176.1 + ,176.2 + ,176.3 + ,177.8 + ,178.5 + ,179.4 + ,179.5 + ,179.6 + ,179.7 + ,179.7 + ,179.8 + ,179.9 + ,180.2 + ,180.4 + ,180.4 + ,181.3 + ,181.9 + ,182.5 + ,182.7 + ,183.1 + ,183.6 + ,183.7 + ,183.8 + ,183.9 + ,184.1 + ,184.4 + ,184.5 + ,185.9 + ,186.6 + ,187.6 + ,187.8 + ,187.9 + ,188 + ,188.3 + ,188.4 + ,188.5 + ,188.5 + ,188.6 + ,188.6 + ,189.4 + ,190 + ,191.9 + ,192.5 + ,193 + ,193.5 + ,193.9 + ,194.2 + ,194.9 + ,194.9 + ,194.9 + ,194.9 + ,195.5 + ,196 + ,196.2 + ,196.2 + ,196.2 + ,196.2 + ,197 + ,197.7 + ,198 + ,198.2 + ,198.5 + ,198.6 + ,199.5 + ,200 + ,201.3 + ,202.2 + ,202.9 + ,203.5 + ,203.5 + ,204 + ,204.1 + ,204.3 + ,204.5 + ,204.8 + ,205.1 + ,205.7 + ,206.5 + ,206.9 + ,207.1 + ,207.8 + ,208 + ,208.5 + ,208.6 + ,209 + ,209.1 + ,209.7 + ,209.8 + ,209.9 + ,210 + ,210.8 + ,211.4 + ,211.7 + ,212 + ,212.2 + ,212.4 + ,212.9 + ,213.4 + ,213.7 + ,214 + ,214.3 + ,214.8 + ,215 + ,215.9 + ,216.4 + ,216.9 + ,217.2 + ,217.5 + ,217.9 + ,218.1 + ,218.6 + ,218.9 + ,219.3 + ,220.4 + ,220.9 + ,221 + ,221.8 + ,222 + ,222.2 + ,222.5 + ,222.9 + ,223.1 + ,223.4 + ,224 + ,225.1 + ,225.5 + ,225.9 + ,226.3 + ,226.5 + ,227 + ,227.3 + ,227.8 + ,228.1 + ,228.4 + ,228.5 + ,228.8 + ,229 + ,229.1 + ,229.3 + ,229.6 + ,229.9 + ,230 + ,230.2 + ,230.8 + ,231 + ,231.7 + ,231.9 + ,233 + ,235.1 + ,236 + ,236.9 + ,237.1 + ,237.5 + ,238.2 + ,238.9 + ,239.1 + ,240 + ,240.2 + ,240.5 + ,240.7 + ,241.1 + ,241.4 + ,242.2 + ,242.9 + ,243.2 + ,243.9) > par9 = '1' > par8 = '2' > par7 = '1' > par6 = '3' > par5 = '12' > par4 = '1' > par3 = '1' > par2 = '0.5' > 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 > 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.01804229 0.1790242 -0.1363828 0.1295973 -0.1213144 0.08172247 [2,] 0.00000000 0.1811433 -0.1333899 0.1476103 -0.1215320 0.08206377 [3,] 0.00000000 0.1803381 -0.1336034 0.1518887 -0.1835528 0.00000000 [4,] 0.00000000 0.1880604 -0.1289701 0.1516738 0.0000000 0.00000000 [5,] 0.00000000 0.1906304 0.0000000 0.1541328 0.0000000 0.00000000 [6,] NA NA NA NA NA NA [7,] NA NA NA NA NA NA [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 [,7] [1,] -0.7554998 [2,] -0.7552607 [3,] -0.6964360 [4,] -1.2642403 [5,] -1.2787509 [6,] NA [7,] NA [8,] NA [9,] NA [10,] NA [11,] NA [12,] NA [13,] NA [14,] NA [[2]] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.96774 0.03889 0.17542 0.77333 0.30840 0.45416 0 [2,] NA 0.00846 0.05447 0.03399 0.30766 0.45079 0 [3,] NA 0.00878 0.05379 0.02859 0.06141 NA 0 [4,] NA 0.00612 0.06377 0.02839 NA NA 0 [5,] NA 0.00743 NA 0.02500 NA NA 0 [6,] NA NA NA NA NA NA NA [7,] NA NA NA NA NA NA NA [8,] NA NA NA NA NA NA NA [9,] NA NA NA NA NA NA NA [10,] NA NA NA NA NA NA NA [11,] NA NA NA NA NA NA NA [12,] NA NA NA NA NA NA NA [13,] NA NA NA NA NA NA NA [14,] NA NA NA NA NA NA NA [[3]] [[3]][[1]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, method = "ML") Coefficients: ar1 ar2 ar3 ma1 sar1 sar2 sma1 0.0180 0.1790 -0.1364 0.1296 -0.1213 0.0817 -0.7555 s.e. 0.4455 0.0862 0.1003 0.4494 0.1188 0.1090 0.1013 sigma^2 estimated as 0.0001342: log likelihood = 635.42, aic = -1254.84 [[3]][[2]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, method = "ML") Coefficients: ar1 ar2 ar3 ma1 sar1 sar2 sma1 0.0180 0.1790 -0.1364 0.1296 -0.1213 0.0817 -0.7555 s.e. 0.4455 0.0862 0.1003 0.4494 0.1188 0.1090 0.1013 sigma^2 estimated as 0.0001342: log likelihood = 635.42, aic = -1254.84 [[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 ma1 sar1 sar2 sma1 0 0.1811 -0.1334 0.1476 -0.1215 0.0821 -0.7553 s.e. 0 0.0682 0.0690 0.0692 0.1189 0.1086 0.1011 sigma^2 estimated as 0.0001342: log likelihood = 635.42, aic = -1256.84 [[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 ma1 sar1 sar2 sma1 0 0.1803 -0.1336 0.1519 -0.1836 0 -0.6964 s.e. 0 0.0682 0.0689 0.0689 0.0976 0 0.0865 sigma^2 estimated as 0.0001347: log likelihood = 635.14, aic = -1258.27 [[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 ma1 sar1 sar2 sma1 0 0.1881 -0.1290 0.1517 0 0 -1.2642 s.e. 0 0.0679 0.0692 0.0687 0 0 0.0814 sigma^2 estimated as 8.557e-05: log likelihood = 633.3, aic = -1256.6 [[3]][[6]] NULL [[3]][[7]] NULL $aic [1] -1254.836 -1256.835 -1258.274 -1256.595 -1255.146 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 > postscript(file="/var/www/html/rcomp/tmp/1cs1v1259775526.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 = 224 Frequency = 1 [1] 7.148423e-03 3.234329e-03 2.141128e-03 1.655904e-03 1.324557e-03 [6] 1.116763e-03 9.489085e-04 8.410207e-04 7.660860e-04 7.081685e-04 [11] 6.626007e-04 -6.406087e-03 -4.282181e-02 -1.003270e-02 1.069187e-02 [16] -2.702542e-02 3.312956e-03 -1.729229e-03 3.667575e-03 -4.155269e-03 [21] 1.042715e-02 4.276413e-03 -1.264970e-02 -3.906890e-03 -1.012070e-02 [26] -4.687730e-03 -1.507403e-02 -1.334281e-05 1.191881e-02 5.722832e-03 [31] 6.650703e-03 9.020541e-04 -1.626221e-02 -2.967562e-03 -1.354563e-03 [36] -4.220903e-03 -6.914082e-03 -9.126325e-03 -3.635108e-03 -3.069702e-03 [41] -7.805416e-03 -6.868813e-03 -2.571679e-04 4.927358e-03 -4.718801e-04 [46] 3.174035e-03 -3.435390e-03 -5.510978e-03 -3.318828e-03 -3.611299e-03 [51] -6.524851e-03 -5.341062e-03 -1.359279e-03 -3.432142e-02 1.775950e-02 [56] 3.643394e-03 -1.211754e-03 -3.278128e-02 -1.485061e-03 6.546265e-03 [61] -8.351643e-03 2.039076e-02 5.684754e-04 -9.426048e-03 1.139162e-03 [66] 4.309247e-03 -3.011594e-03 -9.061698e-03 -1.363042e-02 -2.129366e-03 [71] 6.831810e-03 1.502169e-04 -7.379638e-03 -1.538976e-03 8.416438e-04 [76] -1.320926e-02 2.921405e-03 1.291451e-02 6.060740e-03 -6.589453e-03 [81] -1.158492e-02 -5.520603e-04 2.482651e-03 3.348783e-03 -2.697026e-03 [86] 1.155262e-02 1.185954e-03 -1.356377e-03 2.159291e-03 -4.821701e-04 [91] -3.872249e-03 3.513013e-03 -9.278148e-03 -2.990454e-03 -2.740952e-03 [96] -2.496365e-03 -3.111713e-03 -8.058537e-03 2.656785e-04 2.732686e-02 [101] 6.978310e-03 4.967461e-03 8.597563e-03 3.018174e-03 -2.348121e-03 [106] 1.475874e-02 -5.442025e-03 -6.777785e-03 4.550798e-04 -1.223943e-02 [111] -2.348049e-03 -2.561776e-02 -4.644051e-03 -2.700575e-05 -9.895280e-03 [116] 1.653122e-02 8.004037e-03 -5.216469e-03 3.226641e-03 5.516142e-03 [121] -1.006179e-03 -2.056821e-03 -2.585563e-03 9.348196e-03 1.797033e-02 [126] 1.034516e-02 6.495029e-03 -1.210139e-02 3.648357e-03 -2.981824e-03 [131] 4.790972e-04 2.079521e-03 4.312466e-03 -1.878639e-02 1.725205e-03 [136] -3.551449e-03 -8.741632e-04 -4.883925e-04 9.810440e-03 -3.965916e-03 [141] -3.995032e-04 -2.584117e-03 6.556867e-03 -2.108344e-03 1.104326e-02 [146] -2.032202e-02 -1.350466e-02 -1.775850e-02 1.426218e-02 1.002043e-02 [151] -9.408302e-03 1.491211e-03 -5.806776e-03 -4.462984e-04 9.445800e-03 [156] 6.917188e-03 -1.001175e-03 -1.089637e-02 -3.128294e-03 -6.488200e-03 [161] -6.602132e-03 1.721067e-02 9.219999e-04 1.586979e-03 -2.003086e-03 [166] 1.562583e-03 4.523904e-03 -2.427521e-03 6.537823e-03 -8.642603e-03 [171] -1.933935e-03 1.132127e-02 -2.958181e-04 -1.137159e-02 1.288237e-02 [176] -3.631902e-03 -7.839937e-03 4.628154e-03 2.409050e-03 -2.139477e-03 [181] -2.286137e-04 1.823250e-03 1.651478e-02 -1.476012e-02 -1.857230e-03 [186] 5.014776e-03 -9.844335e-03 6.150600e-03 -9.793224e-04 4.483934e-03 [191] -4.357140e-04 5.812246e-04 -4.668087e-03 -6.730216e-03 -8.171810e-03 [196] -1.555577e-02 -2.742491e-03 -1.081758e-04 -4.620798e-03 -6.317844e-03 [201] -2.566102e-03 8.648590e-03 -4.628611e-03 1.063957e-02 -1.833073e-03 [206] 1.279411e-02 4.069580e-02 -2.435105e-03 7.698867e-03 -1.819800e-03 [211] -1.666174e-03 1.286193e-02 7.164485e-03 -7.637802e-03 1.591495e-02 [216] -4.034521e-03 -1.805032e-03 -8.503801e-03 -1.123411e-02 -6.168913e-03 [221] 9.201889e-03 7.964234e-03 -6.882103e-03 8.067383e-03 > postscript(file="/var/www/html/rcomp/tmp/2lip71259775526.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/3f1lo1259775526.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/4ock71259775526.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/5puy31259775526.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/6gj1c1259775526.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/7wy4o1259775526.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/8qpsa1259775526.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/92ziv1259775526.tab") > system("convert tmp/1cs1v1259775526.ps tmp/1cs1v1259775526.png") > system("convert tmp/2lip71259775526.ps tmp/2lip71259775526.png") > system("convert tmp/3f1lo1259775526.ps tmp/3f1lo1259775526.png") > system("convert tmp/4ock71259775526.ps tmp/4ock71259775526.png") > system("convert tmp/5puy31259775526.ps tmp/5puy31259775526.png") > system("convert tmp/6gj1c1259775526.ps tmp/6gj1c1259775526.png") > system("convert tmp/7wy4o1259775526.ps tmp/7wy4o1259775526.png") > > > proc.time() user system elapsed 11.324 1.489 12.112