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(1.3866 + ,1.3582 + ,1.3332 + ,1.3595 + ,1.3617 + ,1.3684 + ,1.3394 + ,1.3262 + ,1.3173 + ,1.3085 + ,1.327 + ,1.3182 + ,1.293 + ,1.291 + ,1.2984 + ,1.2795 + ,1.299 + ,1.3174 + ,1.326 + ,1.3111 + ,1.2816 + ,1.276 + ,1.2849 + ,1.2818 + ,1.2829 + ,1.2796 + ,1.3008 + ,1.2967 + ,1.2938 + ,1.2833 + ,1.2823 + ,1.2765 + ,1.2634 + ,1.2596 + ,1.2705 + ,1.2591 + ,1.2798 + ,1.2763 + ,1.2795 + ,1.2782 + ,1.2644 + ,1.2596 + ,1.2615 + ,1.2555 + ,1.2555 + ,1.2658 + ,1.2565 + ,1.2783 + ,1.2786 + ,1.2782 + ,1.2905 + ,1.3042 + ,1.2942 + ,1.313 + ,1.3671 + ,1.3549 + ,1.3558 + ,1.3507 + ,1.3494 + ,1.3607 + ,1.3295 + ,1.3193 + ,1.3308 + ,1.3246 + ,1.3392 + ,1.3425 + ,1.3496 + ,1.3255 + ,1.3231 + ,1.3273 + ,1.3276 + ,1.3173 + ,1.3196 + ,1.3058 + ,1.2966 + ,1.2932 + ,1.2947 + ,1.305 + ,1.3232 + ,1.3125 + ,1.2992 + ,1.3266 + ,1.3275 + ,1.3223 + ,1.3403 + ,1.3322 + ,1.3363 + ,1.3425 + ,1.3574 + ,1.3683 + ,1.3623 + ,1.3563 + ,1.3518 + ,1.3494 + ,1.3612 + ,1.369 + ,1.3771 + ,1.3972 + ,1.401 + ,1.3908 + ,1.3901 + ,1.3856 + ,1.4098 + ,1.422 + ,1.4238 + ,1.4207 + ,1.4095 + ,1.4177 + ,1.3866 + ,1.3959 + ,1.4102 + ,1.3969 + ,1.4004 + ,1.385 + ,1.389 + ,1.384 + ,1.392 + ,1.3932 + ,1.3858 + ,1.3978 + ,1.4029 + ,1.394 + ,1.4096 + ,1.4058 + ,1.4134 + ,1.4096 + ,1.4049 + ,1.4009 + ,1.3897 + ,1.4019 + ,1.3901 + ,1.399 + ,1.3901 + ,1.3975 + ,1.3991 + ,1.4089 + ,1.413 + ,1.409 + ,1.4217 + ,1.4223 + ,1.4191 + ,1.4229 + ,1.4227 + ,1.4269 + ,1.4229 + ,1.4104 + ,1.4053 + ,1.4138 + ,1.4303 + ,1.4384 + ,1.441 + ,1.437 + ,1.4357 + ,1.4202 + ,1.4166 + ,1.417 + ,1.4293 + ,1.4294 + ,1.4072 + ,1.4101 + ,1.4112 + ,1.4243 + ,1.433 + ,1.4323 + ,1.4324 + ,1.427 + ,1.4268 + ,1.4364 + ,1.4272 + ,1.4314 + ,1.422 + ,1.4335 + ,1.4262 + ,1.433 + ,1.4473 + ,1.4522 + ,1.4545 + ,1.4594 + ,1.4561 + ,1.4611 + ,1.4671 + ,1.4712 + ,1.4705 + ,1.4658 + ,1.478 + ,1.4783 + ,1.4768 + ,1.467 + ,1.465 + ,1.4549 + ,1.4643 + ,1.4539 + ,1.4537 + ,1.4616 + ,1.4722 + ,1.4694 + ,1.4763 + ,1.475 + ,1.4765 + ,1.4864 + ,1.4881 + ,1.4864 + ,1.4869 + ,1.4918 + ,1.4971 + ,1.4921 + ,1.5 + ,1.502 + ,1.5019 + ,1.4874 + ,1.4785 + ,1.4788 + ,1.48 + ,1.4772 + ,1.4658 + ,1.4761 + ,1.4867 + ,1.4862 + ,1.4984 + ,1.4966 + ,1.5037 + ,1.4922 + ,1.4868 + ,1.4965 + ,1.4875 + ,1.4957 + ,1.4863 + ,1.4815 + ,1.4968 + ,1.4969 + ,1.5083 + ,1.5071 + ,1.4918 + ,1.5023 + ,1.5074 + ,1.509 + ,1.512 + ,1.5068 + ,1.4787 + ,1.4774 + ,1.4768 + ,1.473 + ,1.4757 + ,1.4647 + ,1.4541 + ,1.456 + ,1.4343 + ,1.4337 + ,1.4368 + ,1.4279 + ,1.4276 + ,1.4398 + ,1.4405 + ,1.4433 + ,1.4338 + ,1.4406 + ,1.4389 + ,1.4442 + ,1.435 + ,1.4304 + ,1.4273 + ,1.4528 + ,1.4481 + ,1.4563 + ,1.4486 + ,1.4374 + ,1.4369 + ,1.4279 + ,1.4132 + ,1.4064 + ,1.4135 + ,1.4151 + ,1.4085 + ,1.4072 + ,1.3999 + ,1.3966 + ,1.3913 + ,1.3937 + ,1.3984 + ,1.3847 + ,1.3691 + ,1.3675 + ,1.376 + ,1.374 + ,1.3718 + ,1.3572 + ,1.3607 + ,1.3649 + ,1.3726 + ,1.3567 + ,1.3519 + ,1.3626 + ,1.3577 + ,1.3547 + ,1.3489 + ,1.357 + ,1.3525 + ,1.3548 + ,1.3641 + ,1.3668 + ,1.3582 + ,1.3662 + ,1.3557 + ,1.361 + ,1.3657 + ,1.3765 + ,1.3705 + ,1.3723 + ,1.3756 + ,1.366 + ,1.3548 + ,1.3471 + ,1.3519 + ,1.3338 + ,1.3356 + ,1.3353 + ,1.3471 + ,1.3482 + ,1.3479 + ,1.3468 + ,1.3396 + ,1.334 + ,1.3296 + ,1.3384 + ,1.3585 + ,1.3583 + ,1.3615 + ,1.3544 + ,1.3535 + ,1.3432 + ,1.3486 + ,1.3373 + ,1.3339 + ,1.3311 + ,1.3321 + ,1.329 + ,1.3245 + ,1.3256 + ,1.3315 + ,1.3238 + ,1.3089 + ,1.2924 + ,1.2727 + ,1.2746 + ,1.2969 + ,1.2698 + ,1.2686 + ,1.2587 + ,1.2492 + ,1.2349 + ,1.2428 + ,1.227 + ,1.2334 + ,1.2497 + ,1.236 + ,1.2223 + ,1.2309 + ,1.2255 + ,1.2384 + ,1.2307 + ,1.2155 + ,1.2218 + ,1.2268 + ,1.206 + ,1.1959 + ,1.1942 + ,1.201 + ,1.2045 + ,1.2127 + ,1.2249 + ,1.2258 + ,1.2277 + ,1.2363 + ,1.2372 + ,1.2391 + ,1.2258 + ,1.2271 + ,1.2262 + ,1.2294 + ,1.2339 + ,1.2198 + ,1.2271 + ,1.2328 + ,1.2548 + ,1.2531 + ,1.2579 + ,1.2567 + ,1.266 + ,1.2637 + ,1.2572 + ,1.2569 + ,1.2703 + ,1.2828 + ,1.3 + ,1.2957 + ,1.2844 + ,1.2817 + ,1.285 + ,1.2897 + ,1.2931 + ,1.3033 + ,1.2992 + ,1.3069 + ,1.3028 + ,1.3073 + ,1.3221 + ,1.3206 + ,1.3184 + ,1.3176 + ,1.3253 + ,1.3133 + ,1.3016 + ,1.279 + ,1.2799 + ,1.282 + ,1.286 + ,1.288 + ,1.2836 + ,1.2711 + ,1.2704 + ,1.2611 + ,1.2613 + ,1.2693 + ,1.2713 + ,1.27 + ,1.268 + ,1.28 + ,1.2818 + ,1.2834 + ,1.2874 + ,1.2744 + ,1.2697 + ,1.2715 + ,1.2725 + ,1.2801 + ,1.285 + ,1.2989 + ,1.3078 + ,1.306 + ,1.3074 + ,1.312 + ,1.3364 + ,1.3323 + ,1.3412 + ,1.3477 + ,1.346 + ,1.3611 + ,1.3648 + ,1.3726 + ,1.3705 + ,1.378 + ,1.3856 + ,1.397 + ,1.3874 + ,1.3936 + ,1.3833 + ,1.3958 + ,1.4101 + ,1.4089 + ,1.3896 + ,1.3859 + ,1.3861 + ,1.4016 + ,1.3934 + ,1.4031 + ,1.3912 + ,1.3803 + ,1.3857 + ,1.3857 + ,1.3926 + ,1.4018 + ,1.4014 + ,1.4244 + ,1.4084 + ,1.3917 + ,1.3945 + ,1.377 + ,1.37 + ,1.3711 + ,1.3626 + ,1.3612 + ,1.3481 + ,1.3647 + ,1.3674 + ,1.3647 + ,1.3496 + ,1.3339 + ,1.3321 + ,1.3225 + ,1.3146 + ,1.2998) > par9 = '1' > par8 = '2' > par7 = '0' > par6 = '3' > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1.9' > 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 <- 5 #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.009650555 -0.03934664 -0.03554710 0.04551323 0.05516751 0.04408057 [2,] -0.009531648 -0.03935783 -0.03576134 0.08960024 0.05132305 0.00000000 [3,] 0.000000000 -0.03918035 -0.03549867 0.08956775 0.05148938 0.00000000 [4,] 0.000000000 -0.03868042 0.00000000 0.08865702 0.05030361 0.00000000 [5,] 0.000000000 0.00000000 0.00000000 0.08914706 0.04420298 0.00000000 [6,] 0.000000000 0.00000000 0.00000000 0.09203693 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 [[2]] [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.83370 0.39473 0.46116 0.98700 0.82220 0.98743 [2,] 0.83406 0.39454 0.43761 0.05200 0.27907 NA [3,] NA 0.39661 0.44078 0.05208 0.27742 NA [4,] NA 0.40247 NA 0.05375 0.28637 NA [5,] NA NA NA 0.05337 0.34581 NA [6,] NA NA NA 0.04595 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 [[3]] [[3]][[1]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, method = "ML") Coefficients: ar1 ar2 ar3 sar1 sar2 sma1 -0.0097 -0.0393 -0.0355 0.0455 0.0552 0.0441 s.e. 0.0459 0.0462 0.0482 2.7923 0.2454 2.7970 sigma^2 estimated as 0.0006499: log likelihood = 1102.65, aic = -2191.31 [[3]][[2]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, method = "ML") Coefficients: ar1 ar2 ar3 sar1 sar2 sma1 -0.0097 -0.0393 -0.0355 0.0455 0.0552 0.0441 s.e. 0.0459 0.0462 0.0482 2.7923 0.2454 2.7970 sigma^2 estimated as 0.0006499: log likelihood = 1102.65, aic = -2191.31 [[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 sar1 sar2 sma1 -0.0095 -0.0394 -0.0358 0.0896 0.0513 0 s.e. 0.0455 0.0462 0.0460 0.0460 0.0474 0 sigma^2 estimated as 0.0006499: log likelihood = 1102.66, aic = -2193.32 [[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 sar1 sar2 sma1 0 -0.0392 -0.0355 0.0896 0.0515 0 s.e. 0 0.0462 0.0460 0.0460 0.0474 0 sigma^2 estimated as 0.00065: log likelihood = 1102.64, aic = -2195.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 sar1 sar2 sma1 0 -0.0387 0 0.0887 0.0503 0 s.e. 0 0.0462 0 0.0459 0.0471 0 sigma^2 estimated as 0.0006508: log likelihood = 1102.34, aic = -2196.68 [[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 sar1 sar2 sma1 0 0 0 0.0891 0.0442 0 s.e. 0 0 0 0.0460 0.0468 0 sigma^2 estimated as 0.0006517: log likelihood = 1101.99, aic = -2197.98 $aic [1] -2191.307 -2193.316 -2195.272 -2196.677 -2197.977 -2199.088 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/1dxqz1292884552.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 = 491 Frequency = 1 [1] 1.860832e-03 -7.136445e-02 -6.171980e-02 6.495744e-02 5.485443e-03 [6] 1.675466e-02 -6.561733e-02 -2.666644e-02 -2.779977e-02 -2.185512e-02 [11] 4.344461e-02 -1.188082e-02 -5.522879e-02 -5.734430e-03 1.939994e-02 [16] -4.988747e-02 5.168454e-02 5.138416e-02 2.238993e-02 -3.694717e-02 [21] -6.876748e-02 -1.647679e-02 1.984517e-02 -9.033472e-03 5.067081e-03 [26] 4.694091e-04 4.978682e-02 -1.370736e-02 -7.225684e-03 -2.369110e-02 [31] 1.450767e-03 -1.768536e-02 -3.091769e-02 -7.953014e-03 2.770913e-02 [36] -2.620116e-02 4.773722e-02 -5.106072e-03 8.682145e-03 -4.255460e-03 [41] -3.005224e-02 -1.498261e-02 6.549949e-03 -1.430330e-02 -8.564190e-04 [46] 2.818999e-02 -2.292589e-02 5.123649e-02 1.625825e-03 -8.117775e-04 [51] 2.856294e-02 3.534032e-02 -2.881384e-02 4.590259e-02 1.338540e-01 [56] -3.426563e-02 2.775509e-04 -1.284465e-02 -7.309936e-03 1.633900e-02 [61] -7.597503e-02 -2.661057e-02 3.034593e-02 -1.691916e-02 2.747406e-02 [66] 1.641702e-02 1.975189e-02 -6.143773e-02 -4.373184e-03 5.833338e-03 [71] 3.429375e-03 -2.563527e-02 9.663683e-03 -3.229965e-02 -2.465753e-02 [76] -8.578090e-03 5.058360e-03 2.690966e-02 4.746263e-02 -2.454205e-02 [81] -3.143569e-02 6.730590e-02 -2.508219e-04 -1.518811e-02 4.754868e-02 [86] -1.675272e-02 4.009987e-03 1.403174e-02 3.626737e-02 2.457187e-02 [91] -1.188609e-02 -1.886791e-02 -1.269506e-02 -8.720050e-03 2.508067e-02 [96] 2.183888e-02 2.136510e-02 5.159356e-02 8.661304e-03 -3.000238e-02 [101] -2.870681e-03 -1.264424e-02 5.807591e-02 3.109218e-02 5.727295e-03 [106] -8.794459e-03 -2.896692e-02 1.346783e-02 -8.335683e-02 2.452268e-02 [111] 3.765155e-02 -3.118496e-02 4.350361e-03 -3.368323e-02 7.873927e-03 [116] -1.567601e-02 2.475923e-02 1.329497e-03 -1.184915e-02 2.874026e-02 [121] 1.262761e-02 -2.317248e-02 3.949801e-02 -6.394066e-03 1.647983e-02 [126] -1.045188e-02 -1.100856e-02 -1.402389e-02 -2.700798e-02 2.818311e-02 [131] -2.997362e-02 2.490396e-02 -2.366723e-02 2.195122e-02 4.515879e-04 [136] 2.840409e-02 9.122693e-03 -7.871579e-03 3.256591e-02 -1.847208e-04 [141] -9.254487e-03 7.950422e-03 1.409983e-03 7.195828e-03 -1.077370e-02 [146] -3.286730e-02 -1.453575e-02 2.250056e-02 4.060242e-02 2.215521e-02 [151] 1.012296e-02 -9.808122e-03 -5.359429e-03 -4.490327e-02 -1.080474e-02 [156] 1.864885e-03 3.362870e-02 -4.052180e-04 -5.605408e-02 7.394215e-03 [161] 2.452719e-03 3.168124e-02 2.291588e-02 5.105649e-03 8.038571e-06 [166] -1.445353e-02 -4.980345e-03 2.314903e-02 -2.142802e-02 1.065067e-02 [171] -2.345542e-02 2.864531e-02 -2.238851e-02 2.005571e-02 3.673464e-02 [176] 1.582296e-02 3.457433e-03 1.365551e-02 -9.323493e-03 9.493626e-03 [181] 1.599404e-02 9.136642e-03 -2.200893e-03 -1.261978e-02 2.996774e-02 [186] -1.196881e-03 -5.301987e-03 -2.677721e-02 -3.847906e-03 -3.049216e-02 [191] 2.431863e-02 -2.788858e-02 1.901635e-03 2.210587e-02 2.938669e-02 [196] -9.802025e-03 2.122969e-02 -2.292793e-03 2.404011e-03 2.544984e-02 [201] 4.178480e-03 -5.045645e-03 1.693462e-03 1.203238e-02 1.081123e-02 [206] -1.371822e-02 2.115959e-02 5.510747e-03 -1.640641e-03 -4.202856e-02 [211] -2.309596e-02 -9.082414e-04 2.695244e-03 -8.128999e-03 -2.777774e-02 [216] 3.044880e-02 2.765996e-02 -1.888485e-03 3.392055e-02 -4.366034e-04 [221] 1.802925e-02 -3.402701e-02 -1.470771e-02 2.378512e-02 -2.271854e-02 [226] 1.937160e-02 -2.405227e-02 -1.164030e-02 3.777590e-02 2.675801e-03 [231] 2.839817e-02 3.711641e-04 -4.004961e-02 2.380900e-02 1.505723e-02 [236] 6.277328e-04 9.687089e-03 -1.000474e-02 -8.096409e-02 -4.770849e-03 [241] -3.392990e-03 -1.083361e-02 1.040150e-02 -2.400763e-02 -2.860772e-02 [246] 5.009243e-03 -5.688152e-02 -1.592859e-03 1.417383e-02 -2.068796e-02 [251] -1.164791e-03 3.762965e-02 1.665774e-03 7.975269e-03 -2.170452e-02 [256] 1.775358e-02 -4.803205e-03 1.390017e-02 -2.528349e-02 -8.814591e-03 [261] -9.682544e-03 6.625451e-02 -1.380895e-02 2.363288e-02 -1.828719e-02 [266] -2.966893e-02 -7.115545e-03 -2.313556e-02 -3.917789e-02 -1.524079e-02 [271] 2.137571e-02 1.296753e-03 -1.444569e-02 -9.089483e-04 -1.634452e-02 [276] -8.807875e-03 -1.389053e-02 8.712249e-03 1.405051e-02 -3.258919e-02 [281] -3.958323e-02 -3.004313e-03 2.167287e-02 -5.987591e-03 -1.603736e-03 [286] -3.279450e-02 9.723630e-03 8.358637e-03 1.932421e-02 -3.791935e-02 [291] -6.963982e-03 2.615968e-02 -1.416815e-02 -9.004625e-03 -1.064606e-02 [296] 2.289202e-02 -1.400993e-02 6.367625e-03 2.310569e-02 9.845040e-03 [301] -2.285643e-02 1.989395e-02 -2.629579e-02 1.152077e-02 1.183678e-02 [306] 2.829212e-02 -1.646173e-02 6.637661e-03 6.132954e-03 -2.557945e-02 [311] -2.954798e-02 -1.871385e-02 1.270263e-02 -4.616943e-02 6.072813e-03 [316] 5.580117e-04 3.158002e-02 1.468145e-03 2.882606e-03 -2.057683e-03 [321] -1.653395e-02 -1.557193e-02 -1.159103e-02 2.371938e-02 5.002814e-02 [326] 1.122517e-03 7.958878e-03 -1.692305e-02 -4.145078e-03 -2.994501e-02 [331] 1.423800e-02 -2.809938e-02 -6.319778e-03 -7.645981e-03 2.532399e-03 [336] -8.789154e-03 -8.886192e-03 4.225059e-03 1.518926e-02 -1.796789e-02 [341] -3.616906e-02 -3.749693e-02 -4.669544e-02 3.501993e-03 5.469948e-02 [346] -6.088273e-02 1.202536e-03 -1.916412e-02 -2.316731e-02 -3.692420e-02 [351] 2.554935e-02 -3.429017e-02 1.879229e-02 3.940200e-02 -3.106001e-02 [356] -3.011503e-02 2.299816e-02 -1.262481e-02 2.719543e-02 -1.340316e-02 [361] -3.262940e-02 1.415547e-02 1.185067e-02 -5.143902e-02 -1.965223e-02 [366] 6.797124e-04 1.305350e-02 7.381585e-03 2.137178e-02 3.049721e-02 [371] 3.921483e-03 2.352084e-03 1.851142e-02 2.506953e-03 2.906262e-03 [376] -3.051526e-02 1.909585e-03 -4.159790e-03 6.312097e-03 8.699080e-03 [381] -2.957393e-02 1.617405e-02 1.235923e-02 5.012529e-02 -5.072445e-03 [386] 1.541148e-02 -4.415509e-03 2.070422e-02 -1.025711e-02 -1.531327e-02 [391] -2.746669e-04 3.094194e-02 2.706872e-02 3.937012e-02 -8.799578e-03 [396] -2.743319e-02 -9.097827e-03 4.248186e-03 7.780677e-03 9.725093e-03 [401] 2.694901e-02 -1.069015e-02 1.655813e-02 -1.271555e-02 1.059673e-02 [406] 3.497998e-02 -2.498400e-03 -7.366681e-03 -1.561919e-03 1.747335e-02 [411] -3.354817e-02 -2.753288e-02 -5.435353e-02 2.745848e-03 2.829640e-03 [416] 1.053569e-02 7.453121e-03 -5.430371e-03 -2.970760e-02 -2.925647e-03 [421] -2.140004e-02 1.293901e-03 2.210721e-02 7.257725e-03 -3.137518e-03 [426] -3.181973e-03 2.809969e-02 3.062263e-03 4.691666e-03 9.872927e-03 [431] -2.947921e-02 -1.363754e-02 3.031279e-03 1.811969e-03 1.727175e-02 [436] 1.460669e-02 3.299281e-02 2.089628e-02 -4.729997e-03 1.359599e-03 [441] 1.146808e-02 5.721531e-02 -1.219998e-02 2.224143e-02 1.502301e-02 [446] -5.730814e-03 3.088408e-02 9.240945e-03 1.789226e-02 -6.888899e-03 [451] 1.885422e-02 1.332113e-02 2.877490e-02 -2.729023e-02 1.560905e-02 [456] -2.779917e-02 2.854625e-02 3.383930e-02 -1.784046e-03 -5.079389e-02 [461] -7.935829e-03 -3.190961e-03 3.513434e-02 -1.969363e-02 2.864270e-02 [466] -2.854659e-02 -2.923472e-02 8.568149e-03 2.014376e-03 1.759446e-02 [471] 2.676051e-02 1.423915e-03 5.666618e-02 -4.065463e-02 -4.562612e-02 [476] 6.414413e-03 -4.327755e-02 -2.362138e-02 6.482781e-03 -1.834524e-02 [481] -5.195678e-03 -2.868791e-02 4.043750e-02 8.383384e-03 -2.986604e-03 [486] -3.776931e-02 -3.397764e-02 -7.346715e-03 -2.426229e-02 -1.770035e-02 [491] -3.226486e-02 > postscript(file="/var/www/html/rcomp/tmp/2dxqz1292884552.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/3dxqz1292884552.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/4dxqz1292884552.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/5opqk1292884552.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/6opqk1292884552.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/7opqk1292884552.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/8kg6b1292884552.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/9dq5e1292884552.tab") > > try(system("convert tmp/1dxqz1292884552.ps tmp/1dxqz1292884552.png",intern=TRUE)) character(0) > try(system("convert tmp/2dxqz1292884552.ps tmp/2dxqz1292884552.png",intern=TRUE)) character(0) > try(system("convert tmp/3dxqz1292884552.ps tmp/3dxqz1292884552.png",intern=TRUE)) character(0) > try(system("convert tmp/4dxqz1292884552.ps tmp/4dxqz1292884552.png",intern=TRUE)) character(0) > try(system("convert tmp/5opqk1292884552.ps tmp/5opqk1292884552.png",intern=TRUE)) character(0) > try(system("convert tmp/6opqk1292884552.ps tmp/6opqk1292884552.png",intern=TRUE)) character(0) > try(system("convert tmp/7opqk1292884552.ps tmp/7opqk1292884552.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.792 1.157 10.153