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(115.65 + ,116.00 + ,115.92 + ,116.10 + ,116.44 + ,116.65 + ,117.45 + ,117.58 + ,117.43 + ,117.24 + ,117.25 + ,117.29 + ,117.83 + ,118.22 + ,118.11 + ,118.23 + ,118.15 + ,118.23 + ,119.03 + ,119.38 + ,118.97 + ,118.78 + ,118.97 + ,118.94 + ,119.86 + ,120.09 + ,120.13 + ,120.15 + ,119.90 + ,120.00 + ,120.84 + ,121.17 + ,120.81 + ,121.00 + ,121.12 + ,121.29 + ,122.09 + ,121.88 + ,121.31 + ,121.33 + ,121.45 + ,121.67 + ,122.78 + ,122.84 + ,122.34 + ,122.37 + ,122.72 + ,122.68 + ,122.78 + ,123.08 + ,122.92 + ,123.51 + ,124.18 + ,124.05 + ,124.36 + ,123.87 + ,123.84 + ,123.85 + ,123.83 + ,123.84 + ,124.27 + ,124.56 + ,124.57 + ,124.87 + ,125.08 + ,124.86 + ,124.89 + ,124.58 + ,124.83 + ,124.97 + ,125.19 + ,125.42 + ,125.74 + ,126.07 + ,126.35 + ,126.69 + ,126.85 + ,127.12 + ,127.43 + ,127.49 + ,128.05 + ,127.85 + ,128.35 + ,128.29 + ,128.38 + ,128.80 + ,129.18 + ,130.14 + ,130.77 + ,131.19 + ,131.32 + ,131.41 + ,131.61 + ,131.69 + ,131.94 + ,131.70 + ,132.54 + ,132.74 + ,133.02 + ,132.76 + ,133.05 + ,132.74 + ,133.16 + ,133.10 + ,133.37 + ,133.15 + ,133.18 + ,133.29 + ,133.76 + ,134.51 + ,134.82 + ,134.71 + ,134.52 + ,134.86 + ,135.11 + ,135.28 + ,135.61 + ,135.22 + ,135.47 + ,135.42 + ,135.85 + ,136.27 + ,136.30 + ,136.85 + ,137.05 + ,137.03 + ,137.45 + ,137.49 + ,137.55 + ,138.04 + ,138.03 + ,137.75 + ,138.27 + ,138.99 + ,139.74 + ,139.70 + ,139.97 + ,140.21 + ,140.78 + ,140.80 + ,140.64 + ,140.42 + ,140.85 + ,140.96 + ,141.04 + ,141.71 + ,141.60 + ,142.11 + ,142.59 + ,142.56 + ,143.00 + ,143.18 + ,143.15 + ,143.10 + ,143.45 + ,143.59 + ,143.92 + ,144.66 + ,144.34 + ,144.82 + ,144.49 + ,144.41 + ,144.99 + ,144.95 + ,145.00 + ,145.66 + ,146.68 + ,147.38 + ,147.94 + ,149.12 + ,149.95 + ,150.19 + ,151.16 + ,151.74 + ,152.56 + ,152.09 + ,152.46 + ,152.66 + ,152.38 + ,152.59 + ,152.88 + ,153.29 + ,152.35 + ,152.49 + ,152.20 + ,151.57 + ,151.55 + ,151.79 + ,151.52 + ,151.76 + ,151.92 + ,152.20 + ,152.75 + ,153.49 + ,153.78 + ,154.10 + ,154.62 + ,154.65 + ,154.81 + ,154.92 + ,155.40 + ,155.63 + ,155.76) > par9 = '1' > par8 = '2' > par7 = '1' > par6 = '3' > par5 = '12' > par4 = '1' > par3 = '1' > par2 = '0.0' > 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.06053892 0.03661154 -0.008743468 0.09442202 0.02198366 0.09582256 [2,] 0.00000000 0.04609969 -0.007939473 0.15505971 0.02201233 0.09574374 [3,] 0.00000000 0.04637296 0.000000000 0.15485677 0.02377879 0.09583337 [4,] 0.00000000 0.04280257 0.000000000 0.15448648 0.00000000 0.08354647 [5,] 0.00000000 0.00000000 0.000000000 0.14809700 0.00000000 0.08280493 [6,] 0.00000000 0.00000000 0.000000000 0.14840558 0.00000000 0.00000000 [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.8731444 [2,] -0.8731127 [3,] -0.8733347 [4,] -0.8544162 [5,] -1.1638026 [6,] -1.2074330 [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.97722 0.91421 0.90894 0.96447 0.85516 0.36405 0 [2,] NA 0.54397 0.91413 0.03341 0.85485 0.36432 0 [3,] NA 0.54162 NA 0.03341 0.84161 0.36269 0 [4,] NA 0.56202 NA 0.03376 NA 0.33406 0 [5,] NA NA NA 0.03225 NA 0.33809 0 [6,] NA NA NA 0.03231 NA NA 0 [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.0605 0.0366 -0.0087 0.0944 0.0220 0.0958 -0.8731 s.e. 2.1174 0.3394 0.0763 2.1172 0.1203 0.1053 0.1235 sigma^2 estimated as 5.438e-06: log likelihood = 874.47, aic = -1732.94 [[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.0605 0.0366 -0.0087 0.0944 0.0220 0.0958 -0.8731 s.e. 2.1174 0.3394 0.0763 2.1172 0.1203 0.1053 0.1235 sigma^2 estimated as 5.438e-06: log likelihood = 874.47, aic = -1732.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 ma1 sar1 sar2 sma1 0 0.0461 -0.0079 0.1551 0.0220 0.0957 -0.8731 s.e. 0 0.0758 0.0735 0.0724 0.1202 0.1053 0.1235 sigma^2 estimated as 5.438e-06: log likelihood = 874.47, aic = -1734.94 [[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.0464 0 0.1549 0.0238 0.0958 -0.8733 s.e. 0 0.0758 0 0.0723 0.1188 0.1050 0.1232 sigma^2 estimated as 5.439e-06: log likelihood = 874.47, aic = -1736.93 [[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.0428 0 0.1545 0 0.0835 -0.8544 s.e. 0 0.0737 0 0.0723 0 0.0863 0.0772 sigma^2 estimated as 5.46e-06: log likelihood = 874.45, aic = -1738.89 [[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 ma1 sar1 sar2 sma1 0 0 0 0.1481 0 0.0828 -1.1638 s.e. 0 0 0 0.0687 0 0.0862 0.1039 sigma^2 estimated as 4.031e-06: log likelihood = 874.28, aic = -1740.55 [[3]][[7]] NULL $aic [1] -1732.940 -1734.943 -1736.931 -1738.892 -1740.552 -1741.617 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 > postscript(file="/var/www/html/rcomp/tmp/1ij6c1291465185.ps",horizontal=F,onefile=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 = 203 Frequency = 1 [1] 2.742741e-03 1.228930e-03 8.039381e-04 6.005863e-04 4.817449e-04 [6] 4.024912e-04 3.510333e-04 3.080064e-04 2.724610e-04 2.436001e-04 [11] 2.214856e-04 -2.475036e-03 -1.658598e-02 1.863536e-04 -1.991972e-04 [16] -3.392480e-04 -2.314293e-03 -4.187815e-04 -3.311262e-05 1.152202e-03 [21] -1.622280e-03 2.023961e-04 8.960653e-04 -5.803050e-04 2.068372e-03 [26] -1.210847e-03 1.044382e-03 -1.037330e-03 -2.420975e-03 2.231781e-06 [31] 1.243164e-04 5.554333e-04 -6.361515e-04 2.516853e-03 -2.423513e-04 [36] 1.035978e-03 2.122326e-04 -3.650389e-03 -2.850250e-03 -1.772299e-04 [41] 8.813137e-04 4.715341e-04 1.715296e-03 -1.759567e-03 -8.783325e-04 [46] 8.038165e-04 1.370136e-03 -8.323229e-04 -4.472127e-03 1.380618e-03 [51] -1.085373e-04 3.411311e-03 3.877143e-03 -2.469700e-03 -3.689793e-03 [56] -4.237213e-03 2.873258e-03 -2.595270e-04 -1.256616e-03 -7.500540e-05 [61] -1.252647e-03 9.268304e-04 1.435939e-03 5.056008e-04 9.548815e-05 [66] -2.184680e-03 -4.929890e-03 -1.705778e-03 3.988645e-03 4.994554e-04 [71] 3.660420e-04 1.318961e-03 -1.567276e-03 7.906618e-04 2.727416e-03 [76] 9.674228e-05 -5.349237e-04 1.776731e-03 -2.241178e-03 1.140566e-03 [81] 4.609141e-03 -2.039227e-03 2.673788e-03 -1.241398e-03 -2.671809e-03 [86] 1.410951e-03 2.664881e-03 4.177596e-03 2.229731e-03 2.039279e-03 [91] -3.004506e-03 1.193389e-03 1.200212e-03 4.628571e-04 6.283481e-05 [96] -1.977048e-03 2.780422e-03 -1.072835e-03 1.700323e-03 -4.400073e-03 [101] 8.149564e-04 -3.118595e-03 -1.111192e-04 -5.304583e-04 1.493129e-03 [106] -1.415513e-03 -1.251555e-03 9.496078e-04 -3.420228e-04 2.926687e-03 [111] 9.807373e-04 -3.003084e-03 -2.732315e-03 1.941222e-03 -1.782563e-03 [116] 1.243796e-03 1.559655e-03 -2.438711e-03 6.534751e-04 -3.754155e-04 [121] -8.094858e-04 5.419696e-04 -6.010036e-04 2.466749e-03 -4.170953e-04 [126] -5.253511e-04 -3.103698e-04 1.309975e-04 -2.859974e-04 3.829207e-03 [131] -1.840949e-03 -1.569942e-03 2.109827e-04 1.841261e-03 3.686629e-03 [136] -2.294738e-03 9.529053e-04 6.060167e-04 5.254811e-04 -2.539205e-04 [141] -1.564304e-03 -8.420695e-04 1.604262e-03 6.850536e-04 -2.832848e-03 [146] 1.804432e-03 -2.017437e-03 1.788479e-03 1.288742e-03 -1.011908e-03 [151] -2.466163e-04 9.107113e-04 -5.648631e-04 -2.469243e-04 9.081091e-04 [156] 9.371463e-04 -1.029968e-03 1.520609e-03 -3.320074e-03 1.835004e-03 [161] -3.823863e-03 -5.617327e-04 4.679877e-04 -6.266106e-04 3.123214e-04 [166] 4.227516e-03 3.784594e-03 3.400959e-03 2.456170e-04 3.582407e-03 [171] 3.919075e-03 -1.182488e-03 4.511933e-03 2.263170e-03 1.248171e-03 [176] -3.151133e-03 2.377120e-03 4.481168e-04 -3.808593e-03 1.037935e-03 [181] -1.259258e-03 -1.260359e-03 -5.941144e-03 -2.005975e-04 -3.011432e-03 [186] -3.864392e-03 -2.875409e-03 1.999435e-03 -2.311867e-03 9.135584e-04 [191] -1.183895e-03 7.106920e-04 3.073226e-04 3.634782e-04 1.041124e-03 [196] 3.775103e-05 1.293261e-03 -4.714706e-04 -1.983422e-03 1.093997e-03 [201] 2.145578e-03 3.125513e-04 -5.066168e-04 > postscript(file="/var/www/html/rcomp/tmp/2bsne1291465185.ps",horizontal=F,onefile=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/3bsne1291465185.ps",horizontal=F,onefile=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/4bsne1291465185.ps",horizontal=F,onefile=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/5mjmi1291465185.ps",horizontal=F,onefile=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/6mjmi1291465185.ps",horizontal=F,onefile=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/7mjmi1291465185.ps",horizontal=F,onefile=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/80bkq1291465185.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/9ak1t1291465185.tab") > > try(system("convert tmp/1ij6c1291465185.ps tmp/1ij6c1291465185.png",intern=TRUE)) character(0) > try(system("convert tmp/2bsne1291465185.ps tmp/2bsne1291465185.png",intern=TRUE)) character(0) > try(system("convert tmp/3bsne1291465185.ps tmp/3bsne1291465185.png",intern=TRUE)) character(0) > try(system("convert tmp/4bsne1291465185.ps tmp/4bsne1291465185.png",intern=TRUE)) character(0) > try(system("convert tmp/5mjmi1291465185.ps tmp/5mjmi1291465185.png",intern=TRUE)) character(0) > try(system("convert tmp/6mjmi1291465185.ps tmp/6mjmi1291465185.png",intern=TRUE)) character(0) > try(system("convert tmp/7mjmi1291465185.ps tmp/7mjmi1291465185.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 12.624 1.624 32.916