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(1021.3 + ,1039.79 + ,938.12 + ,947.36 + ,956.6 + ,956.6 + ,942.74 + ,951.98 + ,919.63 + ,901.15 + ,887.28 + ,836.45 + ,841.07 + ,836.45 + ,831.83 + ,817.97 + ,771.75 + ,707.05 + ,716.3 + ,725.54 + ,716.3 + ,707.05 + ,716.3 + ,780.99 + ,859.56 + ,961.22 + ,938.12 + ,988.95 + ,910.39 + ,901.15 + ,896.53 + ,910.39 + ,988.95 + ,988.95 + ,965.85 + ,975.09 + ,1002.82 + ,1025.92 + ,1081.38 + ,1164.56 + ,1201.53 + ,1229.26 + ,1275.47 + ,1275.47 + ,1307.82 + ,1252.36 + ,1261.61 + ,1340.17 + ,1414.11 + ,1409.49 + ,1432.59 + ,1520.4 + ,1529.64 + ,1455.7 + ,1427.97 + ,1538.88 + ,1612.82 + ,1635.93 + ,1603.58 + ,1589.72 + ,1557.37 + ,1589.72 + ,1668.28 + ,1635.93 + ,1615.68 + ,1644.69 + ,1622.71 + ,1626.11 + ,1705.55 + ,1841.35 + ,2029.03 + ,2024.21 + ,1952.87 + ,2153.06 + ,2339.29 + ,2502.89 + ,2515.37 + ,2445.68 + ,2491.11 + ,2691.32 + ,2651.8 + ,2593.49 + ,2697.23 + ,2751.63 + ,2713.9 + ,2747.21 + ,2982.32 + ,3063.39 + ,3058.7 + ,3074.38 + ,3341.06 + ,3500.03 + ,392.88 + ,3071.52 + ,2516.41 + ,2350.7 + ,2488.68 + ,2872.65 + ,3220.21 + ,3078.04 + ,3043.98 + ,3134.34 + ,3141.85 + ,3128.01 + ,3241.16 + ,3389.48 + ,3406.36 + ,3449.84 + ,3606.24 + ,3653.99 + ,3607.31 + ,3712.52 + ,3803.47 + ,3806.33 + ,3768.4 + ,3952.06 + ,4134.85 + ,4060.9 + ,3999.88 + ,4004.03 + ,3977.34 + ,3650.08 + ,3708.85 + ,3764.78 + ,3761.86 + ,3802.55 + ,3773.52 + ,3428.7 + ,3194.21 + ,3095.56 + ,3064.85 + ,3022.98 + ,2887.66 + ,3178.86 + ,3438.47 + ,3493.87 + ,3421.89 + ,3390.28 + ,3319.24 + ,3287.84 + ,3222.82 + ,3182.69 + ,3180.21 + ,3116.34 + ,3297.46 + ,3357.48 + ,3386.03 + ,3319.45 + ,3363.59 + ,3303.47 + ,3210.55 + ,3050.27 + ,3010.55 + ,3011.65 + ,3104.98 + ,3087.85 + ,3160.16 + ,3319.22 + ,3432.49 + ,3475.68 + ,3347.48 + ,3388.81 + ,3610.23 + ,3691.45 + ,3587.86 + ,3704.62 + ,3798.75 + ,3956.54 + ,4121.94 + ,4148.56 + ,4100.37 + ,4060.71 + ,4147.86 + ,3926.61 + ,3865.41 + ,3978.57 + ,3851.95 + ,3701.22 + ,3738.65 + ,3766.9 + ,3711.02 + ,3675.22 + ,3560.53 + ,3723.8 + ,3914.27 + ,3870.77 + ,3924.36 + ,3968.89 + ,3982.93 + ,3917.09 + ,3969.18 + ,4149.81 + ,4406.88 + ,423.82 + ,417.72 + ,4527.16 + ,4617.39 + ,4656.23 + ,4579.9 + ,4652.4 + ,4722.95 + ,4845.81 + ,4975.21 + ,5083.64 + ,5378.04 + ,5684.44 + ,5841.87 + ,5857.23 + ,6174.52 + ,6413.17 + ,6780.11 + ,6524.94 + ,6466.7 + ,6495.61 + ,6399.52 + ,6729.98 + ,7060.77 + ,7423.27 + ,8069.17 + ,8650.68 + ,8938.07 + ,9482.08 + ,10225.26 + ,9390.27 + ,8546.11 + ,8073.77 + ,8655.31 + ,9150.1 + ,9775.81 + ,9785.14 + ,9363.44 + ,9304.18 + ,9030.26 + ,8920.8 + ,8606.08 + ,8353.75 + ,8615.63 + ,8128.64 + ,8715.94 + ,8500.8 + ,8142.58 + ,7614.66 + ,7558.95 + ,7820.75 + ,7828.9 + ,7904.59 + ,8140.97 + ,8483.01 + ,8322.68 + ,8268.01 + ,8402.05 + ,8177.78 + ,7950.54 + ,8049.94 + ,7674.13 + ,7666.36 + ,7570.18 + ,7694.45 + ,7810.64 + ,7748.43 + ,7040.64 + ,7077.26 + ,7245.51 + ,7289.12 + ,7486.92 + ,7519.88 + ,7554.84 + ,7780.89 + ,7748.09 + ,7152.25 + ,6484.66 + ,6254.58 + ,5867.32 + ,5544.16 + ,5822.74 + ,5690.63 + ,5564.78 + ,5088.39 + ,4784.22 + ,5332.46 + ,5541.48 + ,5723.92 + ,5736.99 + ,5992.07 + ,6091.43 + ,6158.17 + ,6303.79 + ,6349.71 + ,6802.96 + ,7132.68 + ,7073.29 + ,7264.5 + ,7105.33 + ,7218.71 + ,7225.72 + ,7354.25 + ,7745.46 + ,8070.26 + ,8366.33 + ,8667.51 + ,8854.34 + ,9218.1 + ,9332.9 + ,9358.31 + ,9248.66 + ,9401.2 + ,9652.04 + ,9957.38 + ,10110.63 + ,10169.26 + ,10343.78 + ,10750.21 + ,11337.5 + ,11786.96 + ,12083.04 + ,12007.74 + ,11745.93 + ,11051.51 + ,11445.9 + ,11924.88 + ,12247.63 + ,12690.91 + ,12910.7 + ,13202.12 + ,13654.67 + ,13862.82 + ,13523.93 + ,14211.17 + ,14510.35 + ,14289.23 + ,14111.82 + ,13086.59 + ,13351.54 + ,13747.69 + ,12855.61 + ,12926.93 + ,12121.95 + ,11731.65 + ,11639.51 + ,12163.78 + ,12029.53 + ,11234.18 + ,9852.13 + ,9709.04 + ,9332.75 + ,7108.6 + ,6691.49 + ,6143.05 + ,6379.15 + ,5994.58 + ,5607.94 + ,6046.13 + ,6624.96 + ,6652.54 + ,6696 + ,7315.16 + ,7907.79 + ,8066.35 + ,7939.64 + ,8068.48 + ,8186.33 + ,7975.21 + ,8357.51 + ,8463.38 + ,7937.68 + ,8034.62 + ,8056.61 + ,8176.95 + ,8441.04 + ,8697.39 + ,8665.57 + ,8625.77 + ,8718.42 + ,8822.34 + ,8597.67 + ,8782.05 + ,8661.06 + ,8265.32 + ,8072.58 + ,721.85 + ,7138.6 + ,7351.11 + ,7077 + ,7272.37 + ,7577.84) > par9 = '1' > par8 = '2' > par7 = '1' > par6 = '3' > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '0.0' > par1 = 'FALSE' > par9 <- '1' > par8 <- '2' > par7 <- '1' > par6 <- '3' > par5 <- '12' > par4 <- '0' > par3 <- '1' > par2 <- '0.0' > 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.2013156 -0.1037992 0.01272997 -0.7350892 0.01594605 -0.01989688 [2,] 0.2010931 -0.1038792 0.01265626 -0.7348916 0.02393152 -0.02008360 [3,] 0.1904362 -0.1073520 0.00000000 -0.7250672 0.02370268 -0.02041655 [4,] 0.1909874 -0.1067161 0.00000000 -0.7252016 0.02317829 0.00000000 [5,] 0.1903998 -0.1070221 0.00000000 -0.7238790 0.00000000 0.00000000 [6,] 0.2318887 0.0000000 0.00000000 -0.7813943 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 [13,] NA NA NA NA NA NA [14,] NA NA NA NA NA NA [,7] [1,] 0.007978863 [2,] 0.000000000 [3,] 0.000000000 [4,] 0.000000000 [5,] 0.000000000 [6,] 0.000000000 [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.03491 0.11274 0.84973 0 0.98661 0.76439 0.99331 [2,] 0.03500 0.11090 0.85075 0 0.68941 0.73218 NA [3,] 0.01451 0.08800 NA 0 0.69165 0.72748 NA [4,] 0.01443 0.09014 NA 0 0.69781 NA NA [5,] 0.01447 0.08851 NA 0 NA NA NA [6,] 0.00082 NA NA 0 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.2013 -0.1038 0.0127 -0.7351 0.0159 -0.0199 0.0080 s.e. 0.0951 0.0653 0.0671 0.0798 0.9492 0.0663 0.9506 sigma^2 estimated as 0.06265: log likelihood = -13.31, aic = 42.62 [[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.2013 -0.1038 0.0127 -0.7351 0.0159 -0.0199 0.0080 s.e. 0.0951 0.0653 0.0671 0.0798 0.9492 0.0663 0.9506 sigma^2 estimated as 0.06265: log likelihood = -13.31, aic = 42.62 [[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.2011 -0.1039 0.0127 -0.7349 0.0239 -0.0201 0 s.e. 0.0950 0.0650 0.0672 0.0797 0.0598 0.0586 0 sigma^2 estimated as 0.06265: log likelihood = -13.31, aic = 40.62 [[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.1904 -0.1074 0 -0.7251 0.0237 -0.0204 0 s.e. 0.0775 0.0628 0 0.0624 0.0597 0.0585 0 sigma^2 estimated as 0.06265: log likelihood = -13.33, aic = 38.66 [[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.1910 -0.1067 0 -0.7252 0.0232 0 0 s.e. 0.0777 0.0628 0 0.0627 0.0597 0 0 sigma^2 estimated as 0.06268: log likelihood = -13.39, aic = 36.78 [[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.1904 -0.1070 0 -0.7239 0 0 0 s.e. 0.0775 0.0627 0 0.0623 0 0 0 sigma^2 estimated as 0.0627: log likelihood = -13.46, aic = 34.93 [[3]][[7]] NULL $aic [1] 42.62085 40.61996 38.65597 36.77770 34.92844 35.78570 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/wessaorg/rcomp/tmp/1erxr1355694832.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 = 385 Frequency = 1 [1] 0.006928827 0.015565978 -0.088947571 -0.026534998 -0.021185156 [6] -0.015669270 -0.024653454 -0.005205822 -0.041690163 -0.042776860 [11] -0.046270180 -0.091675224 -0.051262166 -0.049971365 -0.040070421 [16] -0.045341950 -0.088379442 -0.142257810 -0.079532813 -0.056600347 [21] -0.054838191 -0.048881768 -0.021283741 0.067190618 0.129424603 [26] 0.196472510 0.106872439 0.146723394 0.010789310 0.019015444 [31] 0.001708950 0.016465274 0.091218486 0.051913484 0.022802146 [36] 0.030527370 0.045797324 0.051605340 0.088669204 0.130704186 [41] 0.117391313 0.109774182 0.115366021 0.078926718 0.086129655 [46] 0.014246668 0.028602724 0.075074096 0.097334383 0.063425656 [51] 0.068539132 0.105658129 0.072955632 0.008478587 -0.003013657 [56] 0.070978997 0.082009066 0.072661923 0.034939231 0.021936497 [61] -0.005164754 0.019806217 0.056457744 0.014303197 0.006788848 [66] 0.022986154 -0.001536503 0.005447093 0.049801585 0.103804190 [71] 0.162718367 0.105129189 0.051061679 0.141129375 0.162696960 [76] 0.180020735 0.131294591 0.073232217 0.077298374 0.126746740 [81] 0.064207392 0.035333969 0.067448574 0.058945553 0.029258270 [86] 0.038144419 0.105927272 0.089169923 0.066697631 0.056556403 [91] 0.122987320 0.120220206 -2.099945526 0.957700567 -0.131682430 [96] 0.094594747 0.117150786 0.210134861 0.245109267 0.125885840 [101] 0.100819353 0.099519948 0.067673001 0.047247318 0.070832308 [106] 0.088781049 0.064517964 0.063229650 0.088225149 0.069933886 [111] 0.040006894 0.061564516 0.061918434 0.044041617 0.024312971 [116] 0.067173394 0.083707225 0.039031525 0.021388783 0.017471219 [121] 0.004141162 -0.081482075 -0.027377646 -0.017081112 -0.014280951 [126] 0.002170293 -0.008224045 -0.099169745 -0.125203004 -0.118770227 [131] -0.097554042 -0.085831915 -0.106376517 0.026319950 0.074362290 [136] 0.065147836 0.031700602 0.019341009 -0.007636991 -0.011994471 [141] -0.029113225 -0.030818645 -0.022840445 -0.038014282 0.032754903 [146] 0.028821238 0.031942094 0.003581462 0.020489656 -0.007843884 [151] -0.029361515 -0.068964196 -0.056331741 -0.043397251 -0.002367516 [156] -0.013017761 0.018043880 0.057169373 0.068067152 0.060643052 [161] 0.007526365 0.026213073 0.075909211 0.066459296 0.022182807 [166] 0.055882873 0.056400090 0.080174647 0.093927236 0.070987246 [171] 0.042859419 0.024219240 0.039366615 -0.031402686 -0.025730893 [176] 0.007353048 -0.034195336 -0.055424122 -0.025919488 -0.017422599 [181] -0.027913889 -0.026248772 -0.050458338 0.013308419 0.047588276 [186] 0.018573180 0.034661068 0.032559618 0.026423716 0.002994071 [191] 0.018929479 0.053906483 0.092066625 -2.281649360 -1.213860313 [196] 1.256506590 0.474011883 0.602784154 0.420331020 0.324018427 [201] 0.244841130 0.201731465 0.169103441 0.141701166 0.157586313 [206] 0.161070603 0.139389137 0.104255257 0.130646248 0.122731222 [211] 0.142907631 0.058551040 0.046676750 0.035850505 0.009239006 [216] 0.060352131 0.080488092 0.104581915 0.154738277 0.171071976 [221] 0.152196714 0.170480807 0.191112989 0.045111815 -0.037247124 [226] -0.074999739 0.016005789 0.047850465 0.097643091 0.064991063 [231] 0.009890975 0.009300502 -0.026655876 -0.026481000 -0.055961812 [236] -0.064734630 -0.014170474 -0.077504040 0.028038152 -0.024206315 [241] -0.048351071 -0.096509584 -0.069049120 -0.021710808 -0.021943073 [246] -0.002816946 0.025706127 0.055183581 0.016182605 0.013161407 [251] 0.024821870 -0.012854284 -0.030613432 -0.007265486 -0.058450693 [256] -0.032891548 -0.041358403 -0.011360636 0.002312554 -0.007433713 [261] -0.098045705 -0.048402676 -0.022782064 -0.014408864 0.017716336 [266] 0.012761499 0.015905135 0.040582698 0.020035565 -0.061556466 [271] -0.127763467 -0.118517706 -0.153317079 -0.159332481 -0.062365355 [276] -0.083492565 -0.073185506 -0.140671575 -0.148821045 0.002919140 [281] 0.013308955 0.046316471 0.033755724 0.070969733 0.059780713 [286] 0.055695193 0.063373297 0.049848993 0.106152622 0.111819847 [291] 0.070950275 0.084690437 0.033177840 0.046920651 0.029550262 [296] 0.040531777 0.077915435 0.089499008 0.098541464 0.104234643 [301] 0.093901694 0.107959142 0.085142852 0.066304340 0.037017190 [306] 0.045689677 0.055029695 0.067716674 0.061180197 0.050494286 [311] 0.054101359 0.075081737 0.102023707 0.106727998 0.100357334 [316] 0.065832375 0.029455400 -0.036089322 0.018183862 0.040960125 [321] 0.052302816 0.072717147 0.065897541 0.070558612 0.082367766 [326] 0.070724719 0.027172973 0.075568976 0.063450284 0.031912301 [331] 0.015760766 -0.063280522 -0.012739967 0.008128454 -0.064628497 [336] -0.025347521 -0.090876958 -0.085677638 -0.070554873 -0.009017127 [341] -0.026857907 -0.081017208 -0.178083631 -0.125867560 -0.141904118 [346] -0.368985509 -0.279968476 -0.305799309 -0.173837615 -0.204349193 [351] -0.198721292 -0.062575378 0.024668806 0.012655959 0.024666581 [356] 0.105499000 0.138126151 0.114472205 0.071587880 0.073057452 [361] 0.062625935 0.018167737 0.066500392 0.049015074 -0.026032316 [366] 0.006851499 -0.001481446 0.014532671 0.039775775 0.054244946 [371] 0.033307060 0.023406511 0.028111510 0.029671578 -0.005429938 [376] 0.023467663 -0.003685756 -0.044524478 -0.048405595 -2.449963585 [381] 0.975155571 0.040541344 0.230996866 0.204820809 0.180159476 > postscript(file="/var/wessaorg/rcomp/tmp/21hz81355694832.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/39q741355694832.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/4ic6z1355694832.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/5j4r61355694832.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/64cuk1355694832.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/7jckg1355694832.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/8ulpi1355694832.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/9qc1l1355694832.tab") > > try(system("convert tmp/1erxr1355694832.ps tmp/1erxr1355694832.png",intern=TRUE)) character(0) > try(system("convert tmp/21hz81355694832.ps tmp/21hz81355694832.png",intern=TRUE)) character(0) > try(system("convert tmp/39q741355694832.ps tmp/39q741355694832.png",intern=TRUE)) character(0) > try(system("convert tmp/4ic6z1355694832.ps tmp/4ic6z1355694832.png",intern=TRUE)) character(0) > try(system("convert tmp/5j4r61355694832.ps tmp/5j4r61355694832.png",intern=TRUE)) character(0) > try(system("convert tmp/64cuk1355694832.ps tmp/64cuk1355694832.png",intern=TRUE)) character(0) > try(system("convert tmp/7jckg1355694832.ps tmp/7jckg1355694832.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 13.411 3.289 16.687