R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(8.64 + ,8.89 + ,8.87 + ,8.81 + ,8.87 + ,9.06 + ,9.12 + ,8.66 + ,8.17 + ,8.04 + ,7.71 + ,7.55 + ,7.52 + ,7.38 + ,7.52 + ,7.31 + ,6.92 + ,7.09 + ,7.05 + ,7.37 + ,7.05 + ,6.79 + ,6.35 + ,6.44 + ,6.89 + ,7.16 + ,7.46 + ,7.91 + ,7.86 + ,8.02 + ,8.38 + ,8.50 + ,8.40 + ,8.24 + ,8.33 + ,8.28 + ,8.15 + ,8.06 + ,7.79 + ,7.28 + ,7.52 + ,7.23 + ,7.13 + ,7.21 + ,6.99 + ,6.77 + ,6.69 + ,6.39 + ,6.85 + ,6.74 + ,6.56 + ,6.62 + ,6.71 + ,6.67 + ,6.54 + ,6.14 + ,6.13 + ,5.86 + ,5.88 + ,5.75 + ,5.53 + ,5.86 + ,5.90 + ,5.95 + ,5.69 + ,5.53 + ,5.71 + ,5.60 + ,5.73 + ,5.60 + ,5.41 + ,5.13 + ,5.00 + ,5.04 + ,5.10 + ,4.96 + ,4.90 + ,4.80 + ,4.48 + ,4.29 + ,4.27 + ,4.18 + ,4.02 + ,3.82 + ,4.13 + ,4.16 + ,3.98 + ,4.26 + ,4.70 + ,4.96 + ,5.13 + ,5.35 + ,5.41 + ,5.42 + ,5.51 + ,5.75 + ,5.67 + ,5.46 + ,5.56 + ,5.56 + ,5.54 + ,5.53 + ,5.65 + ,5.58 + ,5.57 + ,5.36 + ,5.23 + ,5.11 + ,5.07 + ,5.04 + ,5.34 + ,5.43 + ,5.31 + ,5.12 + ,4.97 + ,5.00 + ,4.64 + ,4.80 + ,5.10 + ,5.11 + ,5.12 + ,5.36 + ,5.26 + ,5.27 + ,5.10 + ,4.94 + ,4.68 + ,4.41 + ,4.60 + ,4.53 + ,4.18 + ,4.00 + ,3.87 + ,4.09 + ,4.13 + ,3.74 + ,3.81 + ,4.11 + ,4.14 + ,3.99 + ,4.28 + ,4.37 + ,4.24 + ,4.19 + ,4.01 + ,3.95 + ,4.30 + ,4.37 + ,4.40 + ,4.29 + ,4.12 + ,4.07 + ,3.93 + ,3.79 + ,3.67 + ,3.53 + ,3.69 + ,3.69 + ,3.48 + ,3.31 + ,3.16 + ,3.25 + ,3.14 + ,3.19 + ,3.43 + ,3.45 + ,3.31 + ,3.51 + ,3.53 + ,3.83 + ,4.02 + ,3.99 + ,4.11 + ,3.96 + ,3.83 + ,3.71 + ,3.81 + ,3.73 + ,3.99 + ,4.17 + ,4.00 + ,4.10 + ,4.24 + ,4.45 + ,4.62 + ,4.49 + ,4.45 + ,4.49 + ,4.36 + ,4.32 + ,4.45 + ,4.13 + ,4.14 + ,4.30 + ,4.42 + ,4.67 + ,4.96 + ,4.73 + ,4.52 + ,4.36 + ,4.15 + ,3.92 + ,3.88 + ,4.20 + ,3.95 + ,3.78 + ,3.69 + ,3.77 + ,3.66 + ,3.53 + ,3.50 + ,3.14 + ,3.42 + ,3.30 + ,2.81 + ,3.15 + ,3.37 + ,4.05 + ,4.00 + ,4.20 + ,4.21 + ,4.24 + ,4.24 + ,4.17 + ,4.12 + ,4.35 + ,3.98 + ,3.62 + ,4.39 + ,5.01 + ,4.07 + ,3.70 + ,3.59 + ,3.44 + ,3.33 + ,2.98 + ,3.14 + ,2.55 + ,2.49 + ,2.53 + ,2.43) > par9 = '1' > par8 = '2' > par7 = '1' > par6 = '3' > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1' > par1 = 'FALSE' > 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.5348468 -0.1623204 0.1421330 -0.3665739 -0.78441700 -0.06901697 [2,] 0.5342929 -0.1663376 0.1518888 -0.3790373 0.01872987 0.00000000 [3,] 0.5325729 -0.1660519 0.1518056 -0.3773255 0.00000000 0.00000000 [4,] 0.5332856 -0.1651413 0.1538537 -0.3785443 0.00000000 0.00000000 [5,] 0.1609189 -0.1094522 0.1212459 0.0000000 0.00000000 0.00000000 [6,] 0.1444030 0.0000000 0.1049146 0.0000000 0.00000000 0.00000000 [7,] 0.1371180 0.0000000 0.0000000 0.0000000 0.00000000 0.00000000 [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.77219666 [2,] -0.03393502 [3,] -0.01512590 [4,] 0.00000000 [5,] 0.00000000 [6,] 0.00000000 [7,] 0.00000000 [8,] NA [9,] NA [10,] NA [11,] NA [12,] NA [13,] NA [14,] NA [[2]] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.20336 0.09667 0.03511 0.38618 0.02172 0.40326 0.02301 [2,] 0.17959 0.06999 0.02340 0.34411 0.98943 NA 0.98099 [3,] 0.18282 0.07076 0.02340 0.34833 NA NA 0.83546 [4,] 0.17396 0.06898 0.01961 0.33780 NA NA NA [5,] 0.01280 0.09085 0.05891 NA NA NA NA [6,] 0.02442 NA 0.09996 NA NA NA NA [7,] 0.03314 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.5348 -0.1623 0.1421 -0.3666 -0.7844 -0.0690 0.7722 s.e. 0.4193 0.0973 0.0671 0.4222 0.3395 0.0824 0.3374 sigma^2 estimated as 0.04795: log likelihood = 23.77, aic = -31.54 [[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.5348 -0.1623 0.1421 -0.3666 -0.7844 -0.0690 0.7722 s.e. 0.4193 0.0973 0.0671 0.4222 0.3395 0.0824 0.3374 sigma^2 estimated as 0.04795: log likelihood = 23.77, aic = -31.54 [[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.5343 -0.1663 0.1519 -0.3790 0.0187 0 -0.0339 s.e. 0.3969 0.0914 0.0666 0.3998 1.4125 0 1.4229 sigma^2 estimated as 0.04823: log likelihood = 23.22, aic = -32.44 [[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.5326 -0.1661 0.1518 -0.3773 0 0 -0.0151 s.e. 0.3986 0.0915 0.0665 0.4015 0 0 0.0727 sigma^2 estimated as 0.04823: log likelihood = 23.22, aic = -34.44 [[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.5333 -0.1651 0.1539 -0.3785 0 0 0 s.e. 0.3911 0.0904 0.0655 0.3941 0 0 0 sigma^2 estimated as 0.04824: log likelihood = 23.2, aic = -36.4 [[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.1609 -0.1095 0.1212 0 0 0 0 s.e. 0.0642 0.0645 0.0639 0 0 0 0 sigma^2 estimated as 0.04834: log likelihood = 22.96, aic = -37.92 [[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 ma1 sar1 sar2 sma1 0.1444 0 0.1049 0 0 0 0 s.e. 0.0638 0 0.0635 0 0 0 0 sigma^2 estimated as 0.04892: log likelihood = 21.53, aic = -37.05 $aic [1] -31.53887 -32.44371 -34.44268 -36.39934 -37.91511 -37.05027 -36.33948 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 > postscript(file="/var/wessaorg/rcomp/tmp/1t1211354205501.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 = 241 Frequency = 1 [1] 0.0086399955 0.2458417059 -0.0567489237 -0.0605742080 0.0424355425 [6] 0.1834341096 0.0388582986 -0.4749590548 -0.4435083741 -0.0655373911 [11] -0.2629669111 -0.0609388694 0.0067433763 -0.1010461058 0.1770027524 [16] -0.2270689868 -0.3449873269 0.2116291419 -0.0425164575 0.3666927978 [21] -0.3840444425 -0.2095944498 -0.4360278714 0.1871099889 0.4642815123 [26] 0.2511810434 0.2515688732 0.3594675424 -0.1433082913 0.1357457845 [31] 0.2896839659 0.0732606388 -0.1341146919 -0.1833289376 0.1005147373 [36] -0.0525048167 -0.1059935198 -0.0806699168 -0.2517580000 -0.4573722910 [41] 0.3230878528 -0.2963297959 -0.0046166993 0.0692608091 -0.2011270208 [46] -0.1777398789 -0.0566244990 -0.2653665557 0.5264021098 -0.1680322270 [51] -0.1326413005 0.0377318488 0.0928764196 -0.0341116522 -0.1305187524 [56] -0.3906699168 0.0519577922 -0.2549170775 0.1009546391 -0.1318389149 [61] -0.1729006767 0.3596703744 0.0059858940 0.0673050813 -0.3018419547 [66] -0.1266517957 0.1978587562 -0.1087147600 0.1626706617 -0.1676570133 [71] -0.1596870056 -0.2662023175 -0.0759282607 0.0787061589 0.0835999546 [76] -0.1350252892 -0.0439801587 -0.0976306919 -0.2908716597 -0.1374961587 [81] 0.0179280303 -0.0535392816 -0.1270699621 -0.1747972249 0.3483229150 [86] 0.0020213912 -0.1633491796 0.2734690322 0.3964197163 0.2153472891 [91] 0.1030791379 0.1492890812 0.0009535500 -0.0164996560 0.0654747675 [96] 0.2207088544 -0.1157058715 -0.2078900680 0.1051451418 -0.0060471380 [101] 0.0020320567 -0.0176033951 0.1214440302 -0.0852300719 0.0011573573 [106] -0.2211457165 -0.0923313458 -0.1001784612 -0.0006395803 -0.0105849867 [111] 0.3169218375 0.0508756747 -0.1298488356 -0.2041460038 -0.1320057353 [116] 0.0642502004 -0.3443983251 0.2277222724 0.2737480793 0.0044483326 [121] -0.0082303592 0.2070816030 -0.1357058715 0.0233911569 -0.1966235237 [126] -0.1249600302 -0.2379446616 -0.2146197390 0.2457751457 -0.0701587902 [131] -0.3115648582 -0.1493927069 -0.0966634366 0.2754924878 0.0271159546 [136] -0.3821372287 0.1032359774 0.2856952060 0.0275957693 -0.1616761097 [141] 0.2801860870 0.0449756861 -0.1272590889 -0.0616528280 -0.1822221588 [146] -0.0203685632 0.3639099093 0.0383435613 0.0261866616 -0.1510521853 [151] -0.1614596862 -0.0285989224 -0.1212392476 -0.1019481020 -0.0945378487 [156] -0.1079835992 0.1949044613 -0.0105147373 -0.1953119622 -0.1564616937 [161] -0.1254514858 0.1336925105 -0.1051607977 0.0816215161 0.2233375387 [166] -0.0031161248 -0.1481337883 0.1950369301 -0.0109788961 0.3117999773 [171] 0.1256961813 -0.0595348659 0.0928577240 -0.1872621286 -0.1051921096 [176] -0.1138173535 0.1330655464 -0.0808014102 0.2841419887 0.1319637579 [181] -0.1875993800 0.0972707297 0.1066750774 0.2076190510 0.1291839092 [186] -0.1692365521 -0.0432596635 0.0279406465 -0.1221372287 -0.0170310245 [191] 0.1315795388 -0.3251335010 0.0604055502 0.1449170775 0.1304681739 [196] 0.2316224914 0.2371129148 -0.2844666239 -0.2030159432 -0.1601005860 [201] -0.1627651682 -0.1776433080 0.0099990247 0.3478081777 -0.2720786201 [206] -0.1297026615 -0.0990241436 0.1192249112 -0.1037167675 -0.1046733572 [211] -0.0196207712 -0.3441273081 0.3456239812 -0.1572854103 -0.4349023969 [216] 0.3813814066 0.1834927182 0.6996394669 -0.1838650060 0.1841389490 [221] -0.0902225030 0.0338016975 -0.0253150019 -0.0710491456 -0.0430392249 [226] 0.2372201512 -0.3958686768 -0.3013251530 0.7978547411 0.5476280565 [231] -0.9917606354 -0.3150453646 -0.1216179054 -0.0354959847 -0.0495211606 [236] -0.3225750661 0.2262782421 -0.6015638828 0.0619178793 0.0318778526 [241] -0.0438765330 > postscript(file="/var/wessaorg/rcomp/tmp/2btyd1354205501.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/31ynb1354205501.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/4qxzq1354205501.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/5y1ih1354205501.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/6agdd1354205501.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/7bqgq1354205501.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/8bi8g1354205501.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/9jjh31354205501.tab") > > try(system("convert tmp/1t1211354205501.ps tmp/1t1211354205501.png",intern=TRUE)) character(0) > try(system("convert tmp/2btyd1354205501.ps tmp/2btyd1354205501.png",intern=TRUE)) character(0) > try(system("convert tmp/31ynb1354205501.ps tmp/31ynb1354205501.png",intern=TRUE)) character(0) > try(system("convert tmp/4qxzq1354205501.ps tmp/4qxzq1354205501.png",intern=TRUE)) character(0) > try(system("convert tmp/5y1ih1354205501.ps tmp/5y1ih1354205501.png",intern=TRUE)) character(0) > try(system("convert tmp/6agdd1354205501.ps tmp/6agdd1354205501.png",intern=TRUE)) character(0) > try(system("convert tmp/7bqgq1354205501.ps tmp/7bqgq1354205501.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 11.877 2.291 14.301