R version 2.13.0 (2011-04-13) Copyright (C) 2011 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) 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(179.257 + ,179.947 + ,179.094 + ,181.624 + ,184.954 + ,187.928 + ,187.151 + ,189.959 + ,192.492 + ,191.103 + ,191.737 + ,192.31 + ,192.013 + ,192.106 + ,192.141 + ,194.58 + ,196.421 + ,199.021 + ,198.136 + ,199.426 + ,200.997 + ,201.277 + ,201.663 + ,202.874 + ,204.256 + ,205.597 + ,205.471 + ,211.064 + ,212.856 + ,217.036 + ,219.302 + ,219.759 + ,221.388 + ,220.834 + ,221.788 + ,222.358 + ,222.972 + ,224.164 + ,224.915 + ,226.294 + ,224.69 + ,227.021 + ,229.284 + ,229.189 + ,230.032 + ,229.389 + ,231.053 + ,232.56 + ,232.681 + ,231.555 + ,231.428 + ,232.141 + ,234.939 + ,235.424 + ,235.471 + ,236.355 + ,238.693 + ,236.958 + ,237.06 + ,239.282 + ,238.252 + ,241.552 + ,236.23 + ,238.909 + ,240.723 + ,242.12 + ,242.1 + ,243.276 + ,244.677 + ,243.494 + ,244.902 + ,245.247 + ,245.578 + ,243.052 + ,238.121 + ,241.863 + ,241.203 + ,243.634 + ,242.351 + ,245.18 + ,246.126 + ,244.424 + ,245.166 + ,247.258 + ,245.094 + ,246.02 + ,243.082 + ,245.555 + ,243.685 + ,247.277 + ,245.029 + ,246.169 + ,246.778 + ,244.577 + ,246.048 + ,245.775 + ,245.328 + ,245.477 + ,241.903 + ,243.219 + ,248.088 + ,248.521 + ,247.389 + ,249.057 + ,248.916 + ,249.193 + ,250.768 + ,253.106 + ,249.829 + ,249.447 + ,246.755 + ,250.785 + ,250.14 + ,255.755 + ,254.671 + ,253.919 + ,253.741 + ,252.729 + ,253.81 + ,256.653 + ,255.231 + ,258.405 + ,251.061 + ,254.811 + ,254.895 + ,258.325 + ,257.608 + ,258.759 + ,258.621 + ,257.852 + ,260.56 + ,262.358 + ,260.812 + ,261.165 + ,257.164 + ,260.72 + ,259.581 + ,264.743 + ,261.845 + ,262.262 + ,261.631 + ,258.953 + ,259.966 + ,262.85 + ,262.204 + ,263.418 + ,262.752 + ,266.433 + ,267.722 + ,266.003 + ,262.971 + ,265.521 + ,264.676 + ,270.223 + ,269.508 + ,268.457 + ,265.814 + ,266.68 + ,263.018 + ,269.285 + ,269.829 + ,270.911 + ,266.844 + ,271.244 + ,269.907 + ,271.296 + ,270.157 + ,271.322 + ,267.179 + ,264.101 + ,265.518 + ,269.419 + ,268.714 + ,272.482 + ,268.351 + ,268.175 + ,270.674 + ,272.764 + ,272.599 + ,270.333 + ,270.846 + ,270.491 + ,269.16 + ,274.027 + ,273.784 + ,276.663 + ,274.525 + ,271.344 + ,271.115 + ,270.798 + ,273.911 + ,273.985 + ,271.917 + ,273.338 + ,270.601 + ,273.547 + ,275.363 + ,281.229 + ,277.793 + ,279.913 + ,282.5 + ,280.041 + ,282.166 + ,290.304 + ,283.519 + ,287.816 + ,285.226 + ,287.595 + ,289.741 + ,289.148 + ,288.301 + ,290.155 + ,289.648 + ,288.225 + ,289.351 + ,294.735 + ,305.333 + ,309.03 + ,310.215 + ,321.935 + ,325.734 + ,320.846 + ,323.023 + ,319.753 + ,321.753 + ,320.757 + ,324.479 + ,324.641 + ,322.767 + ,324.181 + ,321.389 + ,327.897 + ,334.287 + ,332.653 + ,334.819 + ,335.264 + ,339.622 + ,342.44 + ,346.585 + ,335.378 + ,337.01 + ,339.13 + ,341.193 + ,343.507 + ,348.915 + ,346.431 + ,348.322 + ,348.288 + ,346.597 + ,351.076 + ,355.215 + ,350.562 + ,355.266) > par9 = '1' > par8 = '2' > par7 = '1' > par6 = '3' > par5 = '12' > par4 = '0' > 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.1097122 0.04166441 0.06169642 -0.04557007 1.1388431 -0.1741315 [2,] -0.1550920 0.03462485 0.06280694 0.00000000 1.1382403 -0.1738661 [3,] -0.1599666 0.00000000 0.05836276 0.00000000 1.1379994 -0.1742463 [4,] -0.1585906 0.00000000 0.00000000 0.00000000 1.1443340 -0.1758961 [5,] -0.1500890 0.00000000 0.00000000 0.00000000 0.9027747 0.0000000 [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.8352944 [2,] -0.8343177 [3,] -0.8307031 [4,] -0.8449515 [5,] -0.6466866 [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.84813 0.70090 0.34986 0.93641 0 0.09261 0 [2,] 0.01540 0.59079 0.32497 NA 0 0.09293 0 [3,] 0.01174 NA 0.35666 NA 0 0.10274 0 [4,] 0.01249 NA NA NA 0 0.09594 0 [5,] 0.01806 NA NA NA 0 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.1097 0.0417 0.0617 -0.0456 1.1388 -0.1741 -0.8353 s.e. 0.5723 0.1083 0.0659 0.5705 0.1358 0.1031 0.1262 sigma^2 estimated as 5.858: log likelihood = -583.59, aic = 1183.18 [[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.1097 0.0417 0.0617 -0.0456 1.1388 -0.1741 -0.8353 s.e. 0.5723 0.1083 0.0659 0.5705 0.1358 0.1031 0.1262 sigma^2 estimated as 5.858: log likelihood = -583.59, aic = 1183.18 [[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.1551 0.0346 0.0628 0 1.1382 -0.1739 -0.8343 s.e. 0.0636 0.0643 0.0637 0 0.1359 0.1031 0.1265 sigma^2 estimated as 5.858: log likelihood = -583.59, aic = 1181.19 [[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.160 0 0.0584 0 1.1380 -0.1742 -0.8307 s.e. 0.063 0 0.0632 0 0.1411 0.1064 0.1318 sigma^2 estimated as 5.864: log likelihood = -583.74, aic = 1179.48 [[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.1586 0 0 0 1.1443 -0.1759 -0.8450 s.e. 0.0630 0 0 0 0.1378 0.1052 0.1291 sigma^2 estimated as 5.877: log likelihood = -584.16, aic = 1178.33 [[3]][[6]] NULL [[3]][[7]] NULL $aic [1] 1183.182 1181.187 1179.477 1178.327 1179.017 Warning messages: 1: In log(s2) : NaNs produced 2: In log(s2) : NaNs produced 3: In arima(series, order = order, seasonal = seasonal, include.mean = include.mean, : some AR parameters were fixed: setting transform.pars = FALSE 4: In log(s2) : NaNs produced 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/wessaorg/rcomp/tmp/1mmnx1324289794.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 = 253 Frequency = 1 [1] 0.179256876 0.585898686 -0.639445075 2.059373274 3.208724503 [6] 3.011683105 -0.262590564 2.308804057 2.561273521 -0.849194593 [11] 0.356800147 0.572836548 -0.137524996 -0.233050204 0.362556638 [16] 1.329209880 0.555490501 1.289159974 -0.323777813 -0.034867282 [21] 0.440840714 0.925229882 0.237785115 0.931752396 1.612610281 [26] 1.387461731 0.187251148 4.154779649 1.201555358 2.736808759 [31] 3.066269598 -0.053679733 0.535258546 -0.316400103 0.621134048 [36] 0.135373810 0.163899141 0.638514408 0.984377048 -1.016515440 [41] -3.013694202 -0.269740567 1.684185216 -0.502455530 -0.360123838 [46] -0.331401647 1.134826497 1.256378159 -0.035356219 -1.754654373 [51] -0.542851859 -0.872152794 2.436975265 -0.874299956 -0.964662063 [56] 0.312415146 1.511372460 -1.093521006 -0.856134058 1.361391522 [61] -0.979389512 3.139164586 -4.692648176 0.573078469 0.689556190 [66] 0.255776605 -0.278941020 0.455391853 0.156020456 -0.397380832 [71] 0.970315751 -0.540702005 0.400806901 -3.606478112 -3.797856015 [76] 1.452319432 -1.529263564 0.770949996 -1.331148492 1.809658722 [81] 0.143604806 -1.018482063 -0.141600415 1.490246267 -2.041470175 [86] 0.934718727 -0.718975165 0.161054672 -2.281119228 1.569636318 [91] -1.725415345 -0.493263662 -0.404506012 -1.346238689 0.674398105 [96] -1.211658053 -0.039879115 -0.237055219 -1.892726214 -0.888545407 [101] 4.822785000 -0.833801530 -0.749379540 0.636774270 -0.872324794 [106] 1.253430725 0.982116345 1.996280338 -2.692201955 -1.084806773 [111] -0.773006278 2.345015434 -2.009976409 4.001752657 0.096720037 [116] -1.948611657 -1.031990147 -0.644640931 0.092192341 1.723441333 [121] 0.001121586 3.074548519 -4.958754451 0.569889386 -0.115633553 [126] 0.719233714 -0.056996509 0.712515926 -0.462779441 -0.098995213 [131] 1.892036031 0.684947233 -0.659267204 -0.830212315 -0.783333007 [136] 1.076266778 -1.448612397 2.614382043 -1.961171017 -0.790136997 [141] -1.057268557 -2.137015341 -0.612315685 1.601828326 0.526740976 [146] 0.805429718 2.174788279 1.593979486 1.426440815 -4.399144509 [151] -2.608560747 1.632144742 -0.678094610 6.643817210 -0.569927736 [156] -2.902374659 -2.369159429 -0.125978367 -1.839611459 3.452354150 [161] 0.497635388 0.063651026 -2.680249939 2.756015079 -0.806373829 [166] 0.103011288 -1.483992063 0.401801033 -2.774735765 -4.155315496 [171] 3.324097488 1.162506554 -1.096088848 2.105748746 -1.919579394 [176] -2.435821078 2.443072147 2.177666288 -0.006405500 -3.282757147 [181] 1.845249513 0.569288620 -0.262606602 1.916165607 -0.027573024 [186] 0.640359261 0.055538977 -3.964556597 -1.609769820 -1.151880335 [191] 2.704421136 0.591070047 -1.369428477 1.229838408 -0.982337105 [196] -0.471606976 1.639184165 4.086700841 -1.155958204 2.107720244 [201] 2.836830746 -2.179598471 0.543818395 7.919764219 -4.270184011 [206] 2.960605866 -0.108230387 -0.495610410 1.386492423 -3.342436172 [211] 0.653948731 1.078458436 -1.290453392 -1.062219806 -0.086988639 [216] 2.654166966 13.768101259 4.384657317 3.421712876 9.689110859 [221] 4.344482071 -5.737048668 2.590119345 -3.704066805 1.148973861 [226] -0.216146242 2.765160662 -1.879938838 -4.287474892 -0.766067089 [231] -2.039402710 0.968868856 5.061464435 -0.607937097 2.325301543 [236] 1.308364333 3.666318317 3.838576010 3.007749883 -12.019400565 [241] 0.361760815 1.399416707 3.925864352 -1.386240130 2.552986961 [246] -2.183481625 1.526073319 -0.045452377 -3.405775400 3.318766858 [251] 2.762600841 -1.946862056 4.112677648 > postscript(file="/var/wessaorg/rcomp/tmp/2ciae1324289794.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/wessaorg/rcomp/tmp/3uaau1324289794.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/wessaorg/rcomp/tmp/4h0op1324289794.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/wessaorg/rcomp/tmp/5bet71324289794.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/wessaorg/rcomp/tmp/6zedk1324289794.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/wessaorg/rcomp/tmp/76m291324289794.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/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/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/wessaorg/rcomp/tmp/8axsw1324289794.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/wessaorg/rcomp/tmp/9jgtw1324289795.tab") > > try(system("convert tmp/1mmnx1324289794.ps tmp/1mmnx1324289794.png",intern=TRUE)) character(0) > try(system("convert tmp/2ciae1324289794.ps tmp/2ciae1324289794.png",intern=TRUE)) character(0) > try(system("convert tmp/3uaau1324289794.ps tmp/3uaau1324289794.png",intern=TRUE)) character(0) > try(system("convert tmp/4h0op1324289794.ps tmp/4h0op1324289794.png",intern=TRUE)) character(0) > try(system("convert tmp/5bet71324289794.ps tmp/5bet71324289794.png",intern=TRUE)) character(0) > try(system("convert tmp/6zedk1324289794.ps tmp/6zedk1324289794.png",intern=TRUE)) character(0) > try(system("convert tmp/76m291324289794.ps tmp/76m291324289794.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 11.664 2.466 14.137