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.2998 + ,1.3146 + ,1.3225 + ,1.3321 + ,1.3339 + ,1.3496 + ,1.3647 + ,1.3674 + ,1.3647 + ,1.3481 + ,1.3612 + ,1.3626 + ,1.3711 + ,1.37 + ,1.377 + ,1.3945 + ,1.3917 + ,1.4084 + ,1.4244 + ,1.4014 + ,1.4018 + ,1.3926 + ,1.3857 + ,1.3857 + ,1.3803 + ,1.3912 + ,1.4031 + ,1.3934 + ,1.4016 + ,1.3861 + ,1.3859 + ,1.3896 + ,1.4089 + ,1.4101 + ,1.3958 + ,1.3833 + ,1.3936 + ,1.3874 + ,1.397 + ,1.3856 + ,1.378 + ,1.3705 + ,1.3726 + ,1.3648 + ,1.3611 + ,1.346 + ,1.3477 + ,1.3412 + ,1.3323 + ,1.3364 + ,1.312 + ,1.3074 + ,1.306 + ,1.3078 + ,1.2989 + ,1.285 + ,1.2801 + ,1.2725 + ,1.2715 + ,1.2697 + ,1.2744 + ,1.2874 + ,1.2834 + ,1.2818 + ,1.28 + ,1.268 + ,1.27 + ,1.2713 + ,1.2693 + ,1.2613 + ,1.2611 + ,1.2704 + ,1.2711 + ,1.2836 + ,1.288 + ,1.286 + ,1.282 + ,1.2799 + ,1.279 + ,1.3016 + ,1.3133 + ,1.3253 + ,1.3176 + ,1.3184 + ,1.3206 + ,1.3221 + ,1.3073 + ,1.3028 + ,1.3069 + ,1.2992 + ,1.3033 + ,1.2931 + ,1.2897 + ,1.285 + ,1.2817 + ,1.2844 + ,1.2957 + ,1.3 + ,1.2828 + ,1.2703 + ,1.2569 + ,1.2572 + ,1.2637 + ,1.266 + ,1.2567 + ,1.2579 + ,1.2531 + ,1.2548 + ,1.2328 + ,1.2271 + ,1.2198 + ,1.2339 + ,1.2294 + ,1.2262 + ,1.2271 + ,1.2258 + ,1.2391 + ,1.2372 + ,1.2363 + ,1.2277 + ,1.2258 + ,1.2249 + ,1.2127 + ,1.2045 + ,1.201 + ,1.1942 + ,1.1959 + ,1.206 + ,1.2268 + ,1.2218 + ,1.2155 + ,1.2307 + ,1.2384 + ,1.2255 + ,1.2309 + ,1.2223 + ,1.236 + ,1.2497 + ,1.2334 + ,1.227 + ,1.2428 + ,1.2349 + ,1.2492 + ,1.2587 + ,1.2686 + ,1.2698 + ,1.2969 + ,1.2746 + ,1.2727 + ,1.2924 + ,1.3089 + ,1.3238 + ,1.3315 + ,1.3256 + ,1.3245 + ,1.329 + ,1.3321 + ,1.3311 + ,1.3339 + ,1.3373 + ,1.3486 + ,1.3432 + ,1.3535 + ,1.3544 + ,1.3615 + ,1.3583 + ,1.3585 + ,1.3384 + ,1.3296 + ,1.334 + ,1.3396 + ,1.3468 + ,1.3479 + ,1.3482 + ,1.3471 + ,1.3353 + ,1.3356 + ,1.3338 + ,1.3519 + ,1.3471 + ,1.3548 + ,1.366 + ,1.3756 + ,1.3723 + ,1.3705 + ,1.3765 + ,1.3657 + ,1.361 + ,1.3557 + ,1.3662 + ,1.3582 + ,1.3668 + ,1.3641 + ,1.3548 + ,1.3525 + ,1.357 + ,1.3489 + ,1.3547 + ,1.3577 + ,1.3626 + ,1.3519 + ,1.3567 + ,1.3726 + ,1.3649 + ,1.3607 + ,1.3572 + ,1.3718 + ,1.374 + ,1.376 + ,1.3675 + ,1.3691 + ,1.3847 + ,1.3984 + ,1.3937 + ,1.3913 + ,1.3966 + ,1.3999 + ,1.4072 + ,1.4085 + ,1.4151 + ,1.4135 + ,1.4064 + ,1.4132 + ,1.4279 + ,1.4369 + ,1.4374 + ,1.4486 + ,1.4563 + ,1.4481 + ,1.4528 + ,1.4273 + ,1.4304 + ,1.435 + ,1.4442 + ,1.4389 + ,1.4406 + ,1.4338 + ,1.4433 + ,1.4405 + ,1.4398 + ,1.4276 + ,1.4279 + ,1.4368 + ,1.4337 + ,1.4343 + ,1.456 + ,1.4541 + ,1.4647 + ,1.4757 + ,1.473 + ,1.4768 + ,1.4774 + ,1.4787 + ,1.5068 + ,1.512 + ,1.509 + ,1.5074 + ,1.5023 + ,1.4918 + ,1.5071 + ,1.5083 + ,1.4969 + ,1.4968 + ,1.4815 + ,1.4863 + ,1.4957 + ,1.4875 + ,1.4965 + ,1.4868 + ,1.4922 + ,1.5037 + ,1.4966 + ,1.4984 + ,1.4862 + ,1.4867 + ,1.4761 + ,1.4658 + ,1.4772 + ,1.48 + ,1.4788 + ,1.4785 + ,1.4874 + ,1.5019 + ,1.502 + ,1.5 + ,1.4921 + ,1.4971 + ,1.4918 + ,1.4869 + ,1.4864 + ,1.4881 + ,1.4864 + ,1.4765 + ,1.475 + ,1.4763 + ,1.4694 + ,1.4722 + ,1.4616 + ,1.4537 + ,1.4539 + ,1.4643 + ,1.4549 + ,1.465 + ,1.467 + ,1.4768 + ,1.4783 + ,1.478 + ,1.4658 + ,1.4705 + ,1.4712 + ,1.4671 + ,1.4611 + ,1.4561 + ,1.4594 + ,1.4545 + ,1.4522 + ,1.4473 + ,1.433 + ,1.4262 + ,1.4335 + ,1.422 + ,1.4314 + ,1.4272 + ,1.4364 + ,1.4268 + ,1.427 + ,1.4324 + ,1.4323 + ,1.433 + ,1.4243 + ,1.4112 + ,1.4101 + ,1.4072 + ,1.4294 + ,1.4293 + ,1.417 + ,1.4166 + ,1.4202 + ,1.4357 + ,1.437 + ,1.441 + ,1.4384 + ,1.4303 + ,1.4138 + ,1.4053 + ,1.4104 + ,1.4229 + ,1.4269 + ,1.4227 + ,1.4229 + ,1.4191 + ,1.4223 + ,1.4217 + ,1.409 + ,1.413 + ,1.4089 + ,1.3991 + ,1.3975 + ,1.3901 + ,1.399 + ,1.3901 + ,1.4019 + ,1.3897 + ,1.4009 + ,1.4049 + ,1.4096 + ,1.4134 + ,1.4058 + ,1.4096 + ,1.394 + ,1.4029 + ,1.3978 + ,1.3858 + ,1.3932 + ,1.392 + ,1.384 + ,1.389 + ,1.385 + ,1.4004 + ,1.3969 + ,1.4102 + ,1.3959 + ,1.3866 + ,1.4177 + ,1.4095 + ,1.4207 + ,1.4238 + ,1.422 + ,1.4098 + ,1.3856 + ,1.3901 + ,1.3908 + ,1.401 + ,1.3972 + ,1.3771 + ,1.369 + ,1.3612 + ,1.3494 + ,1.3518 + ,1.3563 + ,1.3623 + ,1.3683 + ,1.3574 + ,1.3425 + ,1.3363 + ,1.3322 + ,1.3403 + ,1.3223 + ,1.3275 + ,1.3266 + ,1.2992 + ,1.3125 + ,1.3232 + ,1.305 + ,1.2947 + ,1.2932 + ,1.2966 + ,1.3058 + ,1.3196 + ,1.3173 + ,1.3276 + ,1.3273 + ,1.3231 + ,1.3255 + ,1.3496 + ,1.3425 + ,1.3392 + ,1.3246 + ,1.3308 + ,1.3193 + ,1.3295 + ,1.3607 + ,1.3494 + ,1.3507 + ,1.3558 + ,1.3549 + ,1.3671 + ,1.313 + ,1.2942 + ,1.3042 + ,1.2905 + ,1.2782 + ,1.2786 + ,1.2783 + ,1.2565 + ,1.2658 + ,1.2555 + ,1.2555 + ,1.2615 + ,1.2596 + ,1.2644 + ,1.2782 + ,1.2795 + ,1.2763 + ,1.2798 + ,1.2591 + ,1.2705 + ,1.2596 + ,1.2634 + ,1.2765 + ,1.2823 + ,1.2833 + ,1.2938 + ,1.2967 + ,1.3008 + ,1.2796 + ,1.2829 + ,1.2818 + ,1.2849 + ,1.276 + ,1.2816 + ,1.3111 + ,1.326 + ,1.3174 + ,1.299 + ,1.2795 + ,1.2984 + ,1.291 + ,1.293 + ,1.3182 + ,1.327 + ,1.3085 + ,1.3173 + ,1.3262 + ,1.3394 + ,1.3684 + ,1.3617 + ,1.3595 + ,1.3332 + ,1.3582 + ,1.3866) > par9 = '1' > par8 = '2' > par7 = '1' > par6 = '3' > par5 = '6' > 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.1863734 -0.03806970 -0.02814111 -0.19642432 0.04365006 0.09574059 [2,] 0.2014360 -0.03793217 -0.02747371 -0.21148439 0.04822209 0.09551884 [3,] 0.0000000 -0.03964309 -0.03171856 -0.01100976 0.04787356 0.09523698 [4,] 0.0000000 -0.03948897 -0.03136616 0.00000000 0.04689310 0.09540057 [5,] 0.0000000 -0.03908081 0.00000000 0.00000000 0.04683743 0.09412142 [6,] 0.0000000 0.00000000 0.00000000 0.00000000 0.04705567 0.09191511 [7,] 0.0000000 0.00000000 0.00000000 0.00000000 0.00000000 0.09324271 [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.004502065 [2,] 0.000000000 [3,] 0.000000000 [4,] 0.000000000 [5,] 0.000000000 [6,] 0.000000000 [7,] 0.000000000 [8,] NA [9,] NA [10,] NA [11,] NA [12,] NA [13,] NA [14,] NA [[2]] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.71272 0.41573 0.58158 0.69736 0.88686 0.05381 0.98827 [2,] 0.68882 0.41856 0.59636 0.67348 0.30108 0.04322 NA [3,] NA 0.38763 0.49257 0.80978 0.30389 0.04383 NA [4,] NA 0.38951 0.49721 NA 0.31195 0.04341 NA [5,] NA 0.39464 NA NA 0.31282 0.04618 NA [6,] NA NA NA NA 0.31069 0.05131 NA [7,] NA NA NA NA NA 0.04820 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.1864 -0.0381 -0.0281 -0.1964 0.0437 0.0957 0.0045 s.e. 0.5059 0.0467 0.0510 0.5048 0.3066 0.0495 0.3060 sigma^2 estimated as 0.0001044: log likelihood = 1550.6, aic = -3085.21 [[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.1864 -0.0381 -0.0281 -0.1964 0.0437 0.0957 0.0045 s.e. 0.5059 0.0467 0.0510 0.5048 0.3066 0.0495 0.3060 sigma^2 estimated as 0.0001044: log likelihood = 1550.6, aic = -3085.21 [[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.2014 -0.0379 -0.0275 -0.2115 0.0482 0.0955 0 s.e. 0.5027 0.0469 0.0518 0.5016 0.0466 0.0471 0 sigma^2 estimated as 0.0001044: log likelihood = 1550.6, aic = -3087.21 [[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.0396 -0.0317 -0.0110 0.0479 0.0952 0 s.e. 0 0.0458 0.0462 0.0457 0.0465 0.0471 0 sigma^2 estimated as 0.0001044: log likelihood = 1550.53, aic = -3089.06 [[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.0395 -0.0314 0 0.0469 0.0954 0 s.e. 0 0.0458 0.0462 0 0.0463 0.0471 0 sigma^2 estimated as 0.0001045: log likelihood = 1550.5, aic = -3091 [[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.0391 0 0 0.0468 0.0941 0 s.e. 0 0.0459 0 0 0.0464 0.0471 0 sigma^2 estimated as 0.0001046: log likelihood = 1550.27, aic = -3092.54 [[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 0 0 0 0.0471 0.0919 0 s.e. 0 0 0 0 0.0464 0.0470 0 sigma^2 estimated as 0.0001047: log likelihood = 1549.91, aic = -3093.82 $aic [1] -3085.207 -3087.208 -3089.063 -3091.005 -3092.543 -3093.818 -3094.789 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/10gg01292452729.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.299799e-03 1.471755e-02 7.855989e-03 9.546519e-03 1.789972e-03 [6] 1.561254e-02 1.501581e-02 1.924902e-03 -3.096204e-03 -1.702508e-02 [11] 1.295167e-02 5.839658e-04 7.684750e-03 -2.587394e-03 6.400921e-03 [16] 1.739874e-02 -3.581876e-03 1.519105e-02 1.421211e-02 -2.319641e-02 [21] 3.187811e-04 -8.497683e-03 -7.972332e-03 -9.145108e-04 -6.934169e-03 [26] 1.208339e-02 1.123777e-02 -1.087560e-02 8.782046e-03 -1.703498e-02 [31] -1.416541e-03 5.301141e-03 1.870327e-02 2.502059e-03 -1.405164e-02 [36] -1.177064e-02 1.080575e-02 -7.375981e-03 7.598036e-03 -1.056489e-02 [41] -7.680808e-03 -5.487120e-03 1.633710e-03 -7.848341e-03 -5.925696e-03 [46] -1.467386e-02 3.372009e-03 -4.998144e-03 -9.945543e-03 5.036908e-03 [51] -2.510828e-02 -2.841627e-03 -7.814398e-04 2.795225e-03 -8.674226e-03 [56] -1.337599e-02 -3.411756e-03 -5.995626e-03 -1.090378e-03 -1.287252e-03 [61] 5.936840e-03 1.327722e-02 -1.526698e-03 -8.195674e-04 -1.624263e-03 [66] -1.208075e-02 2.596883e-03 1.965896e-03 -1.361393e-03 -7.226156e-03 [71] -2.338469e-05 1.003012e-02 1.738876e-04 1.124393e-02 4.861772e-03 [76] -1.476490e-03 -3.825142e-03 -1.434636e-03 -1.116769e-03 2.189231e-02 [81] 1.167679e-02 1.282943e-02 -7.493394e-03 4.400636e-05 2.178010e-03 [86] -7.123970e-04 -1.575498e-02 -4.880838e-03 4.829989e-03 -7.544623e-03 [91] 4.079201e-03 -1.234787e-02 -3.778983e-03 -5.591231e-03 -2.785182e-03 [96] 2.988797e-03 1.090486e-02 4.642095e-03 -1.567967e-02 -1.186522e-02 [101] -1.362157e-02 8.806961e-04 5.591419e-03 3.035195e-03 -8.178131e-03 [106] 2.220197e-03 -3.866134e-03 1.437712e-03 -2.334450e-02 -6.203463e-03 [111] -5.281442e-03 1.519247e-02 -3.042470e-03 -3.307569e-03 1.337776e-03 [116] -1.243187e-03 1.449832e-02 -2.673783e-03 -2.470570e-04 -8.605678e-03 [121] 7.978237e-05 -3.149115e-04 -1.215486e-02 -9.406597e-03 -3.044032e-03 [126] -6.101193e-03 1.706682e-03 1.026184e-02 2.015161e-02 -4.439505e-03 [131] -6.052582e-03 1.631045e-02 7.794644e-03 -1.329254e-02 5.542606e-03 [136] -7.611018e-03 1.431815e-02 1.360978e-02 -1.681858e-02 -6.721325e-03 [141] 1.363407e-02 -7.035746e-03 1.423440e-02 7.458228e-03 9.959261e-03 [146] 2.686861e-03 2.586018e-02 -2.113779e-02 -3.832133e-03 1.799373e-02 [151] 1.753237e-02 1.543179e-02 4.972533e-03 -4.124529e-03 -2.324980e-03 [156] 2.699810e-03 1.413622e-03 -1.811428e-03 -5.322819e-05 5.727335e-03 [161] 1.152640e-02 -7.422478e-03 8.637528e-03 -4.224795e-04 6.260498e-03 [166] -2.817690e-03 -2.306224e-04 -2.025952e-02 -9.569610e-03 4.449565e-03 [171] 5.008542e-03 7.038067e-03 5.194810e-05 1.742161e-03 -1.632636e-03 [176] -1.208977e-02 -6.161090e-04 -1.844672e-03 1.802986e-02 -2.966623e-03 [181] 8.560614e-03 1.135083e-02 9.071159e-03 -3.877089e-03 -2.752814e-03 [186] 6.198293e-03 -1.106122e-02 -4.142425e-03 -5.779309e-03 1.082073e-02 [191] -9.578963e-03 8.758859e-03 -2.899545e-03 -1.010829e-02 -2.932990e-03 [196] 4.309235e-03 -7.558107e-03 4.843831e-03 4.119734e-03 5.769619e-03 [201] -1.010462e-02 3.623141e-03 1.701647e-02 -8.763393e-03 -4.092996e-03 [206] -2.875762e-03 1.531490e-02 1.560515e-03 1.996327e-03 -8.670779e-03 [211] 1.521888e-03 1.531431e-02 1.399648e-02 -5.244715e-03 -3.955562e-03 [216] 6.407720e-03 3.610754e-03 6.887634e-03 -6.866233e-04 6.618948e-03 [221] -1.670897e-03 -6.568117e-03 6.497652e-03 1.292262e-02 7.679591e-03 [226] 6.214336e-04 1.149589e-02 7.546945e-03 -8.823298e-03 3.337301e-03 [231] -2.604299e-02 2.469832e-03 4.220041e-03 9.490269e-03 -5.539166e-03 [236] 1.276862e-04 -6.427316e-03 9.308170e-03 -4.045905e-03 -1.840659e-03 [241] -1.119690e-02 -2.119957e-04 1.156381e-02 -3.831966e-03 3.089464e-04 [246] 2.088732e-02 -8.387708e-04 1.042963e-02 1.120623e-02 -3.427321e-03 [251] 4.029129e-03 -3.567674e-04 2.510770e-03 2.757364e-02 3.864343e-03 [256] -2.588013e-03 -1.833961e-03 -7.122791e-03 -1.038653e-02 1.300344e-02 [261] -5.575571e-05 -1.101066e-02 -3.739884e-04 -1.511517e-02 5.174595e-03 [266] 6.097234e-03 -8.734425e-03 9.812180e-03 -9.548230e-03 6.588719e-03 [271] 1.223924e-02 -8.948624e-03 2.075558e-03 -1.157567e-02 9.656315e-04 [276] -9.447799e-03 -1.128233e-02 1.087009e-02 3.469004e-03 -1.453157e-03 [281] 5.680488e-04 8.902448e-03 1.392765e-02 2.161627e-04 -2.297203e-03 [286] -6.722169e-03 4.968159e-03 -4.744495e-03 -4.635582e-03 -1.552538e-03 [291] 1.536749e-03 -1.217962e-03 -1.010770e-02 -2.068649e-03 1.978036e-04 [296] -6.885664e-03 2.903836e-03 -9.793876e-03 -7.893724e-03 7.577336e-04 [301] 1.078921e-02 -9.029358e-03 9.811988e-03 2.655046e-03 1.108170e-02 [306] 1.628462e-03 -9.088686e-04 -1.112346e-02 3.967375e-03 1.580189e-03 [311] -3.835016e-03 -6.088967e-03 -5.941800e-03 4.738081e-03 -6.049504e-03 [316] -2.516769e-03 -5.607840e-03 -1.415554e-02 -6.537147e-03 8.266081e-03 [321] -1.170143e-02 9.443887e-03 -3.592575e-03 1.042439e-02 -8.820446e-03 [326] -4.468262e-04 6.391524e-03 -3.309185e-04 1.348018e-03 -7.818526e-03 [331] -1.202324e-02 -1.780391e-03 -2.097077e-03 2.134070e-02 2.531045e-04 [336] -1.273623e-02 1.098814e-03 3.633378e-03 1.514012e-02 2.645557e-04 [341] 3.940365e-03 -1.221554e-03 -6.877090e-03 -1.656829e-02 -8.962809e-03 [346] 2.998312e-03 1.232097e-02 5.252901e-03 -3.782083e-03 6.455241e-04 [351] -4.824711e-03 2.840526e-03 -1.555856e-03 -1.264924e-02 4.942146e-03 [356] -2.592812e-03 -8.839910e-03 -2.219345e-03 -8.520706e-03 9.129947e-03 [361] -8.702179e-03 1.197455e-02 -1.138958e-02 1.098116e-02 4.403361e-03 [366] 5.448526e-03 3.851135e-03 -7.778405e-03 5.274847e-03 -1.597996e-02 [371] 9.391949e-03 -6.139206e-03 -1.136077e-02 6.673025e-03 -2.574472e-04 [376] -8.295381e-03 4.213544e-03 -4.192017e-03 1.561539e-02 -3.149657e-03 [381] 1.300719e-02 -1.248968e-02 -1.035332e-02 3.175699e-02 -7.821676e-03 [386] 1.068452e-02 2.584458e-03 -3.917830e-04 -1.222196e-02 -2.529577e-02 [391] 3.470364e-03 4.946794e-04 8.831656e-03 -2.400914e-03 -1.867111e-02 [396] -9.819813e-03 -7.258047e-03 -1.286239e-02 1.635095e-03 4.844259e-03 [401] 8.067183e-03 8.605497e-03 -1.094658e-02 -1.440908e-02 -7.250468e-03 [406] -3.962473e-03 9.665160e-03 -1.753782e-02 6.429845e-03 8.857278e-04 [411] -2.732885e-02 1.307931e-02 9.767358e-03 -1.790449e-02 -9.542815e-03 [416] -8.811473e-05 5.259199e-03 8.951012e-03 1.255199e-02 2.108852e-04 [421] 1.030671e-02 -1.466929e-04 -1.841515e-03 7.446169e-04 2.246714e-02 [426] -5.318917e-03 -2.837948e-03 -1.444801e-02 6.085122e-03 -1.245855e-02 [431] 7.797530e-03 3.174550e-02 -1.209144e-02 2.014587e-03 5.194298e-03 [436] -5.794561e-04 9.504878e-03 -5.491554e-02 -1.796495e-02 1.128079e-02 [441] -1.450986e-02 -1.120063e-02 -1.111613e-03 -6.220399e-04 -1.987671e-02 [446] 8.709954e-03 -1.012410e-02 6.615083e-04 4.859813e-03 3.086724e-03 [451] 7.553818e-03 1.244323e-02 3.043910e-03 -2.069444e-03 3.180900e-03 [456] -2.058302e-02 1.317788e-02 -1.240418e-02 4.685553e-03 1.325058e-02 [461] 5.083814e-03 2.148691e-03 9.522373e-03 2.144478e-03 3.801699e-03 [466] -2.152230e-02 2.705374e-03 7.555872e-04 1.558083e-03 -8.034587e-03 [471] 5.057794e-03 2.929349e-02 1.421161e-02 -8.640154e-03 -1.951098e-02 [476] -1.934776e-02 1.825964e-02 -6.839542e-03 9.955507e-04 2.570579e-02 [481] 9.380887e-03 -1.676437e-02 7.395923e-03 6.536716e-03 1.173635e-02 [486] 2.860467e-02 -5.422852e-03 4.628745e-04 -2.845129e-02 2.526138e-02 [491] 2.759503e-02 > postscript(file="/var/www/html/rcomp/tmp/20gg01292452729.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/30gg01292452729.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/4tpyl1292452729.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/5tpyl1292452729.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/6tpyl1292452729.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/7tpyl1292452729.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/8phdt1292452729.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/9h8ve1292452729.tab") > > try(system("convert tmp/10gg01292452729.ps tmp/10gg01292452729.png",intern=TRUE)) character(0) > try(system("convert tmp/20gg01292452729.ps tmp/20gg01292452729.png",intern=TRUE)) character(0) > try(system("convert tmp/30gg01292452729.ps tmp/30gg01292452729.png",intern=TRUE)) character(0) > try(system("convert tmp/4tpyl1292452729.ps tmp/4tpyl1292452729.png",intern=TRUE)) character(0) > try(system("convert tmp/5tpyl1292452729.ps tmp/5tpyl1292452729.png",intern=TRUE)) character(0) > try(system("convert tmp/6tpyl1292452729.ps tmp/6tpyl1292452729.png",intern=TRUE)) character(0) > try(system("convert tmp/7tpyl1292452729.ps tmp/7tpyl1292452729.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 4.078 1.208 9.113