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(1483509 + ,8036554 + ,4623093 + ,5528662 + ,4221032 + ,8061847 + ,7640066 + ,2935533 + ,8161548 + ,2543967 + ,13163450 + ,3348436 + ,3997440 + ,2322911 + ,2019457 + ,3047748 + ,5728767 + ,2605173 + ,5646743 + ,13121544 + ,3453409 + ,1878333 + ,4247362 + ,23022552 + ,7646203 + ,9016602 + ,3606568 + ,3173510 + ,17568772 + ,10805045 + ,31056269 + ,15623385 + ,6663443 + ,35435745 + ,2823250 + ,5197089 + ,4120632 + ,8832767 + ,3695374 + ,8385805 + ,3777904 + ,5199532 + ,5297275 + ,14847382 + ,5900158 + ,4416718 + ,3926429 + ,4876884 + ,2795297 + ,3385527 + ,3877941 + ,3556729 + ,4982836 + ,2976325 + ,2295026 + ,2218752 + ,4146062 + ,3302091 + ,3864505 + ,5454794 + ,1749836 + ,6684048 + ,2809918 + ,4092664 + ,5070470 + ,9814477 + ,6665318 + ,3912554 + ,6188129 + ,3627991 + ,3308767 + ,3820332 + ,4932979 + ,5567917 + ,5020814 + ,3803273 + ,3999984 + ,4883104 + ,13731747 + ,47531824 + ,8415570 + ,22178158 + ,61211654 + ,18223748 + ,17678085 + ,49299580 + ,25899948 + ,34121754 + ,9859231 + ,29740892 + ,21085212 + ,43003866 + ,59549247 + ,18026465 + ,4680597 + ,5564728 + ,11792347 + ,10371624 + ,3728446 + ,5732978 + ,4067638 + ,2395508 + ,5018801 + ,22068888 + ,7678580 + ,15510095 + ,6471239 + ,14349204 + ,35151574 + ,8210488 + ,5022664 + ,13996871 + ,12822431 + ,14011552 + ,20260980 + ,23718976 + ,45833049 + ,30688420 + ,16576062 + ,14844405 + ,16728286 + ,43477680 + ,57497427 + ,24233726 + ,24921208 + ,9516725 + ,27977239 + ,21632046 + ,22956809 + ,9704324 + ,19871149 + ,5553842 + ,5667858 + ,4348188 + ,10025042 + ,10639796 + ,8639184 + ,10764378 + ,12097733 + ,3988414 + ,4607102 + ,7126895 + ,6009625 + ,21533237 + ,5986771 + ,5455310 + ,1822874 + ,3374062 + ,2920748 + ,2295942 + ,6809829 + ,3318281 + ,13784645 + ,7366577 + ,1628637 + ,4258976 + ,7159779 + ,8098401 + ,6894240 + ,3771246 + ,3249726 + ,3147380 + ,4063037 + ,9621916 + ,5890158 + ,2142901 + ,3145007 + ,1562168 + ,3303103 + ,5886910 + ,3454270 + ,6995348 + ,6487869 + ,12091976 + ,3934625 + ,3999749 + ,3613526 + ,4271706 + ,4253390 + ,5551591 + ,4663041 + ,2104104 + ,5385399 + ,6205877 + ,7529500 + ,17222705 + ,6230913 + ,6508275 + ,4518884 + ,4234991 + ,5625388 + ,5810139 + ,6942187 + ,3711188 + ,4261281 + ,1989945 + ,5033342 + ,7239565 + ,11058795 + ,7384772 + ,3884771 + ,3239201 + ,2316403 + ,4034947 + ,3245271 + ,2387251 + ,2174886 + ,3436080 + ,3738956 + ,1884730 + ,1509144 + ,42728366 + ,3446317 + ,4600683 + ,2953615 + ,3570060 + ,2130208 + ,2442943 + ,4892020 + ,3222192 + ,3121617 + ,3665542 + ,5519432 + ,4113468 + ,1714614 + ,3651985 + ,2419548 + ,2378854 + ,2303949 + ,2555534 + ,1713005 + ,1705960 + ,6115046 + ,3951044 + ,3785568 + ,4670530 + ,2265100 + ,1105643 + ,2814152 + ,3728673 + ,2038949 + ,2402919 + ,2348814 + ,2797822 + ,902505 + ,1331319 + ,4204238 + ,2212485 + ,6797382 + ,4532324 + ,1778808 + ,1890720 + ,5463736 + ,11368931 + ,2040164 + ,4276399 + ,3714445 + ,2068168 + ,1003842 + ,2858535 + ,2355484 + ,2719262 + ,1897741 + ,3945185 + ,3799916 + ,1017654 + ,3052241 + ,3932970 + ,3598151 + ,2296005 + ,2202018 + ,2461777 + ,2452042 + ,2185142 + ,11968502 + ,20395972 + ,21756900 + ,30024300 + ,10811344 + ,1819202 + ,1276885 + ,2946701 + ,3587459 + ,2832691 + ,6674805 + ,3868362 + ,4302909 + ,23265229 + ,22348002 + ,11883953 + ,6634979 + ,2935493 + ,3425669 + ,1171611 + ,6875879 + ,19451908 + ,13885933 + ,7643317 + ,10797966 + ,7297445 + ,8739736 + ,12455537 + ,24291181 + ,4215150 + ,28652176 + ,6851172 + ,3746871 + ,7327861 + ,16829710 + ,13778594 + ,6463717 + ,8956867 + ,21204915 + ,16115855 + ,2536113 + ,16645717 + ,17003730 + ,15969006 + ,31020427 + ,23798897 + ,20770321 + ,44410402 + ,27037491 + ,29627771 + ,18189792 + ,4654610 + ,12307201 + ,15300578 + ,10623864 + ,6880178 + ,29947357 + ,18611399 + ,42432604 + ,20208278 + ,14004392 + ,25737765 + ,16735738 + ,22450825 + ,6880840 + ,8510379 + ,8182481 + ,10948683 + ,4805277 + ,2589229 + ,5658407 + ,12862611 + ,5666188 + ,6875556 + ,7098766 + ,36083309 + ,10200330 + ,7784976) > par9 = '1' > par8 = '2' > par7 = '1' > par6 = '3' > par5 = '12' > par4 = '0' > par3 = '2' > par2 = '0.0' > par1 = 'FALSE' > par9 <- '1' > par8 <- '2' > par7 <- '1' > par6 <- '3' > par5 <- '12' > par4 <- '0' > par3 <- '2' > 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.4935528 -0.3187512 -0.1824257 -0.9999995 -0.8661616 -0.06305078 [2,] -0.4873256 -0.3135034 -0.1875397 -1.0000011 0.1959019 0.00000000 [3,] -0.4874850 -0.3138436 -0.1877113 -1.0000002 0.0000000 0.00000000 [4,] -0.4914935 -0.3211908 -0.1896584 -1.0000134 0.0000000 0.00000000 [5,] NA NA NA NA NA NA [6,] NA NA NA NA NA NA [7,] NA NA NA NA NA NA [8,] NA NA NA NA NA NA [9,] NA NA NA NA NA NA [10,] NA NA NA NA NA NA [11,] NA NA NA NA NA NA [12,] NA NA NA NA NA NA [13,] NA NA NA NA NA NA [14,] NA NA NA NA NA NA [,7] [1,] 0.84689284 [2,] -0.22464570 [3,] -0.02646409 [4,] 0.00000000 [5,] NA [6,] NA [7,] NA [8,] NA [9,] NA [10,] NA [11,] NA [12,] NA [13,] NA [14,] NA [[2]] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0 0 0.00073 0 0.00000 0.27848 0.00000 [2,] 0 0 0.00049 0 0.78157 NA 0.74815 [3,] 0 0 0.00048 0 NA NA 0.65352 [4,] 0 0 0.00040 0 NA NA NA [5,] NA NA NA NA NA NA NA [6,] NA NA NA NA NA NA NA [7,] NA NA NA NA NA NA NA [8,] NA NA NA NA NA NA NA [9,] NA NA NA NA NA NA NA [10,] NA NA NA NA NA NA NA [11,] NA NA NA NA NA NA NA [12,] NA NA NA NA NA NA NA [13,] NA NA NA NA NA NA NA [14,] NA NA NA NA NA NA NA [[3]] [[3]][[1]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, method = "ML") Coefficients: ar1 ar2 ar3 ma1 sar1 sar2 sma1 -0.4936 -0.3188 -0.1824 -1.0000 -0.8662 -0.0631 0.8469 s.e. 0.0541 0.0594 0.0535 0.0075 0.1599 0.0581 0.1510 sigma^2 estimated as 0.4814: log likelihood = -372.71, aic = 761.41 [[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.4936 -0.3188 -0.1824 -1.0000 -0.8662 -0.0631 0.8469 s.e. 0.0541 0.0594 0.0535 0.0075 0.1599 0.0581 0.1510 sigma^2 estimated as 0.4814: log likelihood = -372.71, aic = 761.41 [[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.4873 -0.3135 -0.1875 -1.0000 0.1959 0 -0.2246 s.e. 0.0535 0.0586 0.0533 0.0075 0.7060 0 0.6991 sigma^2 estimated as 0.4844: log likelihood = -373.63, aic = 761.25 [[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.4875 -0.3138 -0.1877 -1.0000 0 0 -0.0265 s.e. 0.0536 0.0589 0.0533 0.0075 0 0 0.0589 sigma^2 estimated as 0.4846: log likelihood = -373.66, aic = 759.32 [[3]][[5]] NULL [[3]][[6]] NULL [[3]][[7]] NULL $aic [1] 761.4113 761.2540 759.3217 757.5223 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 log(s2) : NaNs produced > postscript(file="/var/wessaorg/rcomp/tmp/1eb6l1353683549.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 = 352 Frequency = 1 [1] 0.0063548676 -0.0152864780 -1.2111599581 -0.4275704139 -0.5875520402 [6] 0.0539205310 -0.1863400865 -1.0849844370 0.4698434487 -1.1161931633 [11] 1.0810963463 -0.8936963835 -0.2964904142 -0.5860722367 -0.5948312078 [16] 0.2400662943 0.6749197865 -0.3862744374 0.6410536319 0.9884264225 [21] -0.8962086780 -0.9092492067 0.2743501856 1.5640773638 -0.2372216234 [26] 0.2025828145 -0.9584391227 -0.7654602315 1.3574798861 0.0457720740 [31] 1.2450841858 -0.1008262127 -1.0735240561 1.1096726409 -2.1920994713 [36] -0.2646385964 -0.4567965791 0.3375452318 -0.5150888051 0.5372394592 [41] -0.5251876070 0.0004031476 0.0852684318 0.9496019919 -0.4280985781 [46] -0.4180324974 -0.4383292920 -0.1315027431 -0.5665744091 -0.0306508818 [51] 0.0752474032 -0.0569124551 0.3501887959 -0.3621857771 -0.4211520253 [56] -0.2290234856 0.4222667042 0.0056104471 0.2211646483 0.4541144687 [61] -0.9825759442 0.9180196010 -0.5116928597 0.1540040029 0.3768512601 [66] 0.6923965294 0.0374017284 -0.5007584686 0.1940638067 -0.5656213360 [71] -0.3114972957 0.0228272369 0.1625510099 0.2865708125 0.0358290588 [76] -0.2501167343 -0.0942534353 0.1263027931 1.0784528826 1.7682346064 [81] -0.8016609165 0.6520361718 1.1158793156 -0.7922973620 -0.1655686324 [86] 0.7756864879 -0.4347455553 0.2177262056 -1.1673368465 0.4240884172 [91] -0.1602277798 0.6578230400 0.6960894769 -0.9136994154 -1.7045339778 [96] -0.8443032995 0.1619095807 0.0369198961 -0.8471932193 0.0240296685 [101] -0.5210175862 -0.7476774227 0.4467609038 1.6145423148 -0.2032569956 [106] 0.7445360544 -0.6539929393 0.3473094624 1.1159825460 -0.9615003482 [111] -0.8147437044 0.4765606606 -0.0522095140 0.2314158397 0.5609684859 [116] 0.3598502937 0.8258637025 0.0180381258 -0.6301324377 -0.4367402195 [121] -0.2035462524 0.8050023791 0.7010710499 -0.4333766489 -0.1654839310 [126] -1.1939031663 0.4413726802 -0.0494978901 0.0830340516 -0.7377999403 [131] 0.2247094943 -1.2182135795 -0.5585408061 -0.5105440008 0.4808943764 [136] 0.3618495568 0.0132314130 0.2456455533 0.1632387314 -1.0390522699 [141] -0.3265547768 0.1513259994 -0.1244666488 1.3109764438 -0.6606971148 [146] -0.3747937767 -1.2979311014 -0.1803024565 -0.2056456919 -0.3156310223 [151] 1.0434958504 -0.3225757518 1.3539088553 0.0382827884 -1.5128836316 [156] 0.3280374135 0.3741728661 0.3772203060 0.1985056762 -0.5590294257 [161] -0.4811512121 -0.3353037953 0.1053724263 0.9348405156 0.0313144425 [166] -0.9360862375 -0.1435305122 -0.9124188140 0.3510271646 0.8047019798 [171] -0.1450250505 0.7485282599 0.1898855138 0.6885400158 -0.7174143599 [176] -0.3315567968 -0.3328675333 -0.1159845720 0.0413709509 0.2692965340 [181] -0.0102793108 -0.7794683188 0.5412669202 0.3328502416 0.4066729380 [186] 1.1501836978 -0.5572834201 -0.1752037184 -0.5246361473 -0.4289111251 [191] 0.1418808343 0.0832488023 0.2637655775 -0.5027621721 -0.0953492283 [196] -0.8504105161 0.4923462266 0.6294594207 0.7271740465 0.0770074329 [201] -0.6598137514 -0.5583361182 -0.6993082354 0.2155777032 -0.0804626586 [206] -0.3151773214 -0.2081816495 0.2533786914 0.2335626685 -0.5004285758 [211] -0.4215448885 3.0346863740 -1.1113939206 0.0490104498 -0.4878353129 [216] -0.4050581493 -0.5111532672 -0.1454706448 0.6293394063 -0.1272807890 [221] 0.0138470471 0.1301551724 0.3858055309 0.0272027546 -0.8902174182 [226] 0.3155724286 -0.3854969375 -0.1538432527 -0.0391971135 0.0035004556 [231] -0.3433697377 -0.1721147297 1.1705617827 0.1115097050 0.1527340236 [236] 0.2899094511 -0.7418894512 -1.0016862268 0.3900579706 0.3734956607 [241] -0.3073807056 0.1356489945 -0.0866534670 0.0992203236 -0.9878790024 [246] -0.1032846221 1.0252782535 -0.1618007152 1.2238166470 0.1269889977 [251] -0.8920113822 -0.3003235068 0.7135728241 1.0940074198 -1.0218161210 [256] 0.3324451534 -0.2101281001 -0.7476303154 -0.8836529678 0.4832264252 [261] 0.0149016564 0.2476352513 -0.1755143065 0.5585675774 0.2519522422 [266] -1.1430995770 0.5573585618 0.3780997909 0.1263826450 -0.2266088189 [271] -0.2636282915 -0.0523122275 -0.0449876037 -0.0815516316 1.6584721786 [276] 1.3334672701 0.8327988294 0.7963996287 -0.7428820332 -2.1651502918 [281] -1.4811567887 -0.0921491441 0.1528868451 0.0550097186 0.9583721888 [286] -0.1695719858 0.1067369823 1.7590553781 0.7257969961 -0.0912114720 [291] -0.6157369757 -1.3688942796 -0.5867987128 -1.3651430179 1.1466984509 [296] 1.5922820266 0.5416032716 -0.1156120712 0.1383589012 -0.4352652693 [301] -0.0019995380 0.3741626071 0.7979053724 -1.3257168516 1.3145651072 [306] -0.9664022115 -1.0041315708 0.3244423583 0.7082324281 0.2912848425 [311] -0.4717908429 0.0318250323 0.7372350725 0.1060969895 -1.6374082461 [316] 1.0143351027 0.3329594031 0.1561859099 0.9556034811 0.0388774601 [321] -0.0625507388 0.7291689768 -0.2451063991 0.0492864684 -0.4502628119 [326] -1.6725458601 0.1208639643 0.1909402645 -0.2087152907 -0.3645855481 [331] 1.2021654385 0.0271831894 0.9588109863 -0.2069278830 -0.5772241332 [336] 0.3416016813 -0.4113092945 0.1508498400 -1.0667269788 -0.3550644300 [341] -0.2638622540 0.1007022415 -0.6277863188 -0.9383323659 0.2996359199 [346] 0.8442262334 -0.3102355169 0.2027205336 0.0073128026 1.5451379052 [351] -0.4614598932 -0.3868387900 > postscript(file="/var/wessaorg/rcomp/tmp/2glfl1353683549.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/332xs1353683549.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/47umr1353683549.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/5i4df1353683549.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/6jlst1353683549.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/771wu1353683549.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/892tc1353683549.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/9wo8i1353683549.tab") > > try(system("convert tmp/1eb6l1353683549.ps tmp/1eb6l1353683549.png",intern=TRUE)) character(0) > try(system("convert tmp/2glfl1353683549.ps tmp/2glfl1353683549.png",intern=TRUE)) character(0) > try(system("convert tmp/332xs1353683549.ps tmp/332xs1353683549.png",intern=TRUE)) character(0) > try(system("convert tmp/47umr1353683549.ps tmp/47umr1353683549.png",intern=TRUE)) character(0) > try(system("convert tmp/5i4df1353683549.ps tmp/5i4df1353683549.png",intern=TRUE)) character(0) > try(system("convert tmp/6jlst1353683549.ps tmp/6jlst1353683549.png",intern=TRUE)) character(0) > try(system("convert tmp/771wu1353683549.ps tmp/771wu1353683549.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 17.379 3.286 20.659