R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(267.850 + ,255.468 + ,246.717 + ,238.276 + ,229.336 + ,231.047 + ,264.440 + ,261.308 + ,257.844 + ,253.687 + ,248.286 + ,248.641 + ,243.753 + ,233.495 + ,222.356 + ,211.333 + ,202.478 + ,202.746 + ,238.802 + ,235.385 + ,224.820 + ,219.386 + ,213.106 + ,213.166 + ,208.201 + ,197.775 + ,189.191 + ,178.543 + ,171.809 + ,172.365 + ,204.140 + ,205.467 + ,193.079 + ,190.224 + ,185.553 + ,185.184 + ,183.059 + ,175.496 + ,168.120 + ,160.374 + ,155.290 + ,156.152 + ,189.784 + ,192.250 + ,184.896 + ,184.835 + ,180.172 + ,181.875 + ,182.412 + ,180.627 + ,174.303 + ,169.431 + ,163.902 + ,166.114 + ,198.414 + ,205.626 + ,199.333 + ,199.588 + ,196.569 + ,200.880 + ,201.579 + ,195.483 + ,190.617 + ,187.576 + ,183.968 + ,186.998 + ,216.617 + ,224.692 + ,222.476 + ,223.247 + ,225.618 + ,232.758 + ,235.868 + ,232.863 + ,227.564 + ,226.822 + ,223.864 + ,227.155 + ,260.300 + ,273.944 + ,270.779 + ,268.104 + ,268.703 + ,273.413 + ,275.597 + ,270.111 + ,262.272 + ,255.823 + ,250.753 + ,250.512 + ,277.888 + ,289.694 + ,281.310 + ,275.425 + ,271.287 + ,274.059 + ,274.113 + ,267.546 + ,257.622 + ,250.612 + ,243.829 + ,243.180 + ,275.362 + ,287.027 + ,279.175 + ,282.416 + ,275.424 + ,277.862 + ,284.998 + ,272.182 + ,258.613 + ,253.046 + ,243.315 + ,234.312 + ,265.912 + ,279.384 + ,262.547 + ,256.102 + ,251.133 + ,249.598 + ,251.592 + ,244.976 + ,237.527 + ,232.790 + ,224.726 + ,223.918 + ,252.637 + ,263.736 + ,251.143 + ,239.530 + ,232.401 + ,233.749 + ,232.055 + ,224.473 + ,215.866 + ,207.808 + ,199.440 + ,193.330 + ,222.787 + ,241.434 + ,221.263 + ,207.448 + ,200.241 + ,205.009 + ,206.230 + ,198.253 + ,194.660 + ,185.847 + ,180.314 + ,176.282 + ,203.541 + ,222.042 + ,197.519 + ,185.142 + ,176.355 + ,180.448 + ,180.143 + ,173.666 + ,165.687 + ,162.719 + ,157.079 + ,153.730 + ,182.698 + ,200.765 + ,176.512 + ,166.618 + ,158.644 + ,159.585 + ,163.095 + ,159.044 + ,155.511 + ,153.745 + ,150.569 + ,150.605 + ,179.612 + ,194.690 + ,189.917 + ,184.128 + ,175.335 + ,179.566 + ,181.140 + ,177.876 + ,175.041 + ,169.292 + ,166.070 + ,166.972 + ,206.348 + ,215.706 + ,202.108 + ,195.411 + ,193.111 + ,195.198 + ,198.770 + ,194.163 + ,190.420 + ,189.733 + ,186.029 + ,191.531 + ,232.571 + ,243.477 + ,227.247 + ,217.859 + ,208.679 + ,213.188 + ,216.234 + ,213.587 + ,209.465 + ,204.045 + ,200.237 + ,203.666 + ,241.476 + ,260.307 + ,243.324 + ,244.460 + ,233.575 + ,237.217 + ,235.243 + ,230.354 + ,227.184 + ,221.678 + ,217.142 + ,219.452 + ,256.446 + ,265.845 + ,248.624 + ,241.114 + ,229.245 + ,231.805 + ,219.277 + ,219.313 + ,212.610 + ,214.771 + ,211.142 + ,211.457 + ,240.048 + ,240.636 + ,230.580 + ,208.795 + ,197.922 + ,194.596 + ,194.581 + ,185.686 + ,178.106 + ,172.608 + ,167.302 + ,168.053 + ,202.300 + ,202.388 + ,182.516 + ,173.476 + ,166.444 + ,171.297) > par9 = '1' > par8 = '2' > par7 = '1' > 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 > 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.7770384 0.1297308 0.02496643 -0.7997637 0.05368924 -0.0823379 [2,] 0.7767273 0.1295489 0.02657995 -0.7988359 0.00000000 -0.1049105 [3,] 0.7955180 0.1438050 0.00000000 -0.8153271 0.00000000 -0.1006043 [4,] 0.7872647 0.1529280 0.00000000 -0.8179082 0.00000000 0.0000000 [5,] NA NA NA NA NA NA [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.5261447 [2,] -0.4775028 [3,] -0.4789422 [4,] -0.5159547 [5,] NA [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 0.12059 0.75534 0 0.78654 0.49455 0.00602 [2,] 0 0.12103 0.73833 0 NA 0.20577 0.00000 [3,] 0 0.04584 NA 0 NA 0.21750 0.00000 [4,] 0 0.03072 NA 0 NA NA 0.00000 [5,] NA NA NA NA NA NA NA [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.7770 0.1297 0.025 -0.7998 0.0537 -0.0823 -0.5261 s.e. 0.1156 0.0833 0.080 0.0962 0.1980 0.1204 0.1899 sigma^2 estimated as 14.36: log likelihood = -659.42, aic = 1334.85 [[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.7770 0.1297 0.025 -0.7998 0.0537 -0.0823 -0.5261 s.e. 0.1156 0.0833 0.080 0.0962 0.1980 0.1204 0.1899 sigma^2 estimated as 14.36: log likelihood = -659.42, aic = 1334.85 [[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.7767 0.1295 0.0266 -0.7988 0 -0.1049 -0.4775 s.e. 0.1135 0.0833 0.0795 0.0938 0 0.0827 0.0676 sigma^2 estimated as 14.36: log likelihood = -659.46, aic = 1332.92 [[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.7955 0.1438 0 -0.8153 0 -0.1006 -0.4789 s.e. 0.0920 0.0717 0 0.0694 0 0.0814 0.0672 sigma^2 estimated as 14.37: log likelihood = -659.52, aic = 1331.04 [[3]][[5]] NULL [[3]][[6]] NULL [[3]][[7]] NULL $aic [1] 1334.849 1332.923 1331.035 1330.515 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 > postscript(file="/var/www/html/rcomp/tmp/1tops1228475087.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 = 252 Frequency = 1 [1] 0.154643237 0.059567463 0.031600062 0.016108983 0.004763946 [6] 0.005537696 0.035829293 0.028389651 0.021948094 0.015793234 [11] 0.009193405 -0.132616742 -0.971365980 1.886507028 -2.100444566 [16] -2.574808862 0.119471382 -0.944276272 2.634168962 0.183734745 [21] -6.424969555 -1.365706579 -0.125983611 0.407256723 0.418937426 [26] 1.192530006 2.215837885 -0.099011180 2.142147031 -0.031094941 [31] -3.380320483 4.268069225 -3.736787188 1.625343933 1.536848340 [36] -0.534537971 2.383324345 3.294678555 1.407724314 1.700516090 [41] 1.822867907 -0.842875680 -0.461230534 2.225771812 1.644769947 [46] 2.557005338 -0.608647728 0.407255882 2.644773799 6.164143805 [51] 0.776468958 1.937405305 -0.941894360 -0.726664246 -3.303902502 [56] 4.953705777 0.942563404 0.473275037 0.331307677 1.744616799 [61] 0.665434953 -2.283816856 0.822459314 2.738078050 1.198945609 [66] -0.118755672 -4.859621041 2.529325054 4.745522764 0.740129207 [71] 4.673345655 3.149951458 1.695050060 1.133682847 -1.424010376 [76] 2.148819167 -0.149062106 -1.103002080 -0.189953487 6.243172292 [81] 0.235221351 -4.919268590 -0.832355227 -1.393347004 -0.508511940 [86] -2.412651229 -3.035459119 -4.089505272 -1.425818654 -2.761611055 [91] -4.930368805 2.592684515 -2.758406617 -3.777370737 -2.548600773 [96] -0.282541465 0.101189981 0.094925899 -1.678823892 -0.667764500 [101] -0.709651930 -0.368090235 4.118274238 2.893399504 -0.613549850 [106] 7.139498755 -4.003654613 -1.833176545 6.549187459 -6.629440427 [111] -5.982087171 0.364712324 -3.072505826 -8.724332998 1.223479965 [116] 4.574372959 -8.327377163 -5.807354898 1.435989749 -2.102634309 [121] -0.124810038 5.117367156 5.730818434 2.379043407 0.355091125 [126] 4.164542918 -1.710810546 -1.334288697 -0.321131633 -7.116768405 [131] -2.531272426 1.775684533 -2.681304563 0.676163233 1.469506270 [136] -1.633877290 0.054026994 -3.308011501 0.509521222 8.517034617 [141] -7.417426880 -6.871257559 -0.163405052 5.082902517 2.143583785 [146] 1.005604486 6.362592919 -1.351691635 2.289142471 0.871266033 [151] -2.982439849 2.625538311 -7.998909385 -2.820358242 -1.657799866 [156] 2.059382467 -0.611448781 2.113333319 -0.967974054 4.969825106 [161] 1.802112234 0.459251517 0.289824260 1.543653422 -4.605340661 [166] 0.624260169 -0.106759501 -2.227014570 3.313466260 3.474351197 [171] 4.005211530 2.868536433 2.402741891 2.720337052 -1.259176406 [176] -3.776139995 15.570579538 4.325686840 -3.865054824 -0.787257319 [181] -2.697395926 0.307668545 0.623512003 -3.415876368 -0.147358640 [186] 1.712564586 9.536465903 -7.825091897 -3.176619565 0.571024800 [191] 5.288851245 -2.152440956 0.654749823 -0.905274557 -0.488618790 [196] 3.429594867 -0.231422611 5.070531153 5.804107357 -3.529503056 [201] -3.247789665 -3.056687312 -5.235647982 1.254360910 0.267224275 [206] 1.745292225 -0.284859944 -3.580185468 -0.349366321 1.072804262 [211] 1.083091196 6.300961761 -2.212955717 8.681046832 -3.351237766 [216] -1.833353213 -5.663056785 -2.273518642 0.773061734 -0.892731367 [221] -0.734118825 -0.047684393 0.046039356 -6.033535969 -1.469758817 [226] -3.359241323 -2.244269025 0.378103686 -11.387050425 5.519072875 [231] -0.362692216 8.269985318 2.429390796 -1.706263600 -8.454404984 [236] -10.554385116 7.766276407 -12.406343855 0.440418850 -3.311992349 [241] 8.339467134 -3.960836554 -0.782080878 -2.264592610 0.549628773 [246] 1.500679870 3.408971278 -4.903667161 -5.645939667 6.333488770 [251] 5.929533580 6.461879170 > postscript(file="/var/www/html/rcomp/tmp/218l41228475087.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/3wqz51228475087.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/4hhjz1228475087.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/5ma421228475087.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/6b4611228475087.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/7hw911228475087.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/8kk9x1228475087.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/950i21228475087.tab") > > system("convert tmp/1tops1228475087.ps tmp/1tops1228475087.png") > system("convert tmp/218l41228475087.ps tmp/218l41228475087.png") > system("convert tmp/3wqz51228475087.ps tmp/3wqz51228475087.png") > system("convert tmp/4hhjz1228475087.ps tmp/4hhjz1228475087.png") > system("convert tmp/5ma421228475087.ps tmp/5ma421228475087.png") > system("convert tmp/6b4611228475087.ps tmp/6b4611228475087.png") > system("convert tmp/7hw911228475087.ps tmp/7hw911228475087.png") > > > proc.time() user system elapsed 16.472 1.680 21.798