R version 2.8.0 (2008-10-20) Copyright (C) 2008 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. Natural language support but running in an English locale 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(349 + ,336 + ,331 + ,327 + ,323 + ,322 + ,385 + ,405 + ,412 + ,411 + ,410 + ,415 + ,414 + ,411 + ,408 + ,410 + ,411 + ,416 + ,479 + ,498 + ,502 + ,498 + ,499 + ,506 + ,510 + ,509 + ,502 + ,495 + ,490 + ,490 + ,553 + ,570 + ,573 + ,572 + ,575 + ,580 + ,580 + ,574 + ,563 + ,556 + ,546 + ,545 + ,605 + ,628 + ,631 + ,626 + ,614 + ,606 + ,602 + ,589 + ,574 + ,558 + ,552 + ,546 + ,607 + ,636 + ,631 + ,623 + ,618 + ,605 + ,619 + ,596 + ,570 + ,546 + ,528 + ,506 + ,555 + ,568 + ,564 + ,553 + ,541 + ,542 + ,540 + ,521 + ,505 + ,491 + ,482 + ,478 + ,523 + ,531 + ,532 + ,540 + ,525 + ,533 + ,531 + ,508 + ,495 + ,482 + ,470 + ,466 + ,515 + ,518 + ,516 + ,511 + ,500 + ,498 + ,494 + ,476 + ,458 + ,443 + ,430 + ,424 + ,476 + ,481 + ,470 + ,460 + ,451 + ,450 + ,444 + ,429 + ,421 + ,400 + ,389 + ,384 + ,432 + ,446 + ,431 + ,423 + ,416 + ,416 + ,413 + ,399 + ,386 + ,374 + ,365 + ,365 + ,418 + ,428 + ,424 + ,421 + ,417 + ,423 + ,423 + ,419 + ,406 + ,398 + ,390 + ,391 + ,444 + ,460 + ,455 + ,456 + ,452 + ,459 + ,461 + ,451 + ,443 + ,439 + ,430 + ,436 + ,488 + ,506 + ,502 + ,501 + ,501 + ,515 + ,521 + ,520 + ,512 + ,509 + ,505 + ,511 + ,570 + ,592 + ,594 + ,586 + ,586 + ,592 + ,594 + ,594 + ,586 + ,586 + ,572 + ,572 + ,563 + ,563 + ,555 + ,555 + ,554 + ,554 + ,601 + ,601 + ,622 + ,622 + ,617 + ,617 + ,606 + ,606 + ,595 + ,595 + ,599 + ,599 + ,600 + ,600 + ,592 + ,592 + ,575 + ,575 + ,567 + ,567 + ,555 + ,555 + ,555 + ,555 + ,608 + ,608 + ,631 + ,631 + ,629 + ,629 + ,624 + ,624 + ,610 + ,610 + ,616 + ,616 + ,621 + ,621 + ,604 + ,604 + ,584 + ,584 + ,574 + ,574 + ,555 + ,555 + ,545 + ,545 + ,599 + ,599 + ,620 + ,620 + ,608 + ,608 + ,590 + ,590 + ,579 + ,579 + ,580 + ,580 + ,579 + ,579 + ,572 + ,572 + ,560 + ,560 + ,551 + ,551 + ,537 + ,537 + ,541 + ,541 + ,588 + ,588 + ,607 + ,607 + ,599 + ,599 + ,578 + ,578 + ,563 + ,563 + ,566 + ,566 + ,561 + ,561 + ,554 + ,554 + ,540 + ,540 + ,526 + ,526 + ,512 + ,512 + ,505 + ,505 + ,554 + ,554 + ,584 + ,584 + ,569 + ,569 + ,540 + ,540 + ,522 + ,522 + ,526 + ,526 + ,527 + ,527 + ,516 + ,516 + ,503 + ,503 + ,489 + ,489 + ,479 + ,479 + ,475 + ,475 + ,524 + ,524 + ,552 + ,552 + ,532 + ,532 + ,511 + ,511 + ,492 + ,492 + ,492 + ,492 + ,493 + ,493 + ,481 + ,481 + ,462 + ,462 + ,457 + ,457 + ,442 + ,442 + ,439 + ,439 + ,488 + ,488 + ,521 + ,521 + ,501 + ,501 + ,485 + ,485 + ,464 + ,464 + ,460 + ,460 + ,467 + ,467 + ,460 + ,460 + ,448 + ,448 + ,443 + ,443 + ,436 + ,436 + ,431 + ,431 + ,484 + ,484 + ,510 + ,510 + ,513 + ,513 + ,503 + ,503 + ,471 + ,471 + ,471 + ,471 + ,476 + ,476 + ,475 + ,475 + ,470 + ,470 + ,461 + ,461 + ,455 + ,455 + ,456 + ,456 + ,517 + ,517 + ,525 + ,525 + ,523 + ,523 + ,519 + ,519 + ,509 + ,509 + ,512 + ,512 + ,519 + ,519 + ,517 + ,517 + ,510 + ,510 + ,509 + ,509 + ,501 + ,501 + ,507 + ,507 + ,569 + ,569 + ,580 + ,580 + ,578 + ,578 + ,565 + ,565 + ,547 + ,547 + ,555 + ,555 + ,562 + ,561 + ,555 + ,544 + ,537 + ,543 + ,594 + ,611 + ,613 + ,611 + ,594 + ,595 + ,591 + ,589 + ,584 + ,573 + ,567 + ,569 + ,621 + ,629 + ,628 + ,612 + ,595 + ,597 + ,593 + ,590 + ,580 + ,574 + ,573 + ,573 + ,620 + ,626 + ,620 + ,588 + ,566 + ,557 + ,561 + ,549 + ,532 + ,526 + ,511 + ,499 + ,555 + ,565 + ,542 + ,527 + ,510 + ,514 + ,517 + ,508 + ,493 + ,490 + ,469 + ,478 + ,528 + ,534 + ,518 + ,506 + ,502 + ,516 + ,528 + ,533 + ,536 + ,537 + ,524 + ,536 + ,587 + ,597 + ,581 + ,564 + ,558 + ,575 + ,580 + ,575 + ,563 + ,552 + ,537 + ,545 + ,601 + ,604 + ,586 + ,564 + ,549 + ,551) > par9 = '1' > par8 = '2' > par7 = '1' > par6 = '3' > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1' > par1 = 'FALSE' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > library(lattice) > if (par1 == 'TRUE') par1 <- TRUE > if (par1 == 'FALSE') par1 <- FALSE > par2 <- as.numeric(par2) #Box-Cox lambda transformation parameter > par3 <- as.numeric(par3) #degree of non-seasonal differencing > par4 <- as.numeric(par4) #degree of seasonal differencing > par5 <- as.numeric(par5) #seasonal period > par6 <- as.numeric(par6) #degree (p) of the non-seasonal AR(p) polynomial > par7 <- as.numeric(par7) #degree (q) of the non-seasonal MA(q) polynomial > par8 <- as.numeric(par8) #degree (P) of the seasonal AR(P) polynomial > par9 <- as.numeric(par9) #degree (Q) of the seasonal MA(Q) polynomial > armaGR <- function(arima.out, names, n){ + try1 <- arima.out$coef + try2 <- sqrt(diag(arima.out$var.coef)) + try.data.frame <- data.frame(matrix(NA,ncol=4,nrow=length(names))) + dimnames(try.data.frame) <- list(names,c('coef','std','tstat','pv')) + try.data.frame[,1] <- try1 + for(i in 1:length(try2)) try.data.frame[which(rownames(try.data.frame)==names(try2)[i]),2] <- try2[i] + try.data.frame[,3] <- try.data.frame[,1] / try.data.frame[,2] + try.data.frame[,4] <- round((1-pt(abs(try.data.frame[,3]),df=n-(length(try2)+1)))*2,5) + vector <- rep(NA,length(names)) + vector[is.na(try.data.frame[,4])] <- 0 + maxi <- which.max(try.data.frame[,4]) + continue <- max(try.data.frame[,4],na.rm=TRUE) > .05 + vector[maxi] <- 0 + list(summary=try.data.frame,next.vector=vector,continue=continue) + } > arimaSelect <- function(series, order=c(13,0,0), seasonal=list(order=c(2,0,0),period=12), include.mean=F){ + nrc <- order[1]+order[3]+seasonal$order[1]+seasonal$order[3] + coeff <- matrix(NA, nrow=nrc*2, ncol=nrc) + pval <- matrix(NA, nrow=nrc*2, ncol=nrc) + mylist <- rep(list(NULL), nrc) + names <- NULL + if(order[1] > 0) names <- paste('ar',1:order[1],sep='') + if(order[3] > 0) names <- c( names , paste('ma',1:order[3],sep='') ) + if(seasonal$order[1] > 0) names <- c(names, paste('sar',1:seasonal$order[1],sep='')) + if(seasonal$order[3] > 0) names <- c(names, paste('sma',1:seasonal$order[3],sep='')) + arima.out <- arima(series, order=order, seasonal=seasonal, include.mean=include.mean, method='ML') + mylist[[1]] <- arima.out + last.arma <- armaGR(arima.out, names, length(series)) + mystop <- FALSE + i <- 1 + coeff[i,] <- last.arma[[1]][,1] + pval [i,] <- last.arma[[1]][,4] + i <- 2 + aic <- arima.out$aic + while(!mystop){ + mylist[[i]] <- arima.out + arima.out <- arima(series, order=order, seasonal=seasonal, include.mean=include.mean, method='ML', fixed=last.arma$next.vector) + aic <- c(aic, arima.out$aic) + last.arma <- armaGR(arima.out, names, length(series)) + mystop <- !last.arma$continue + coeff[i,] <- last.arma[[1]][,1] + pval [i,] <- last.arma[[1]][,4] + i <- i+1 + } + list(coeff, pval, mylist, aic=aic) + } > arimaSelectplot <- function(arimaSelect.out,noms,choix){ + noms <- names(arimaSelect.out[[3]][[1]]$coef) + coeff <- arimaSelect.out[[1]] + k <- min(which(is.na(coeff[,1])))-1 + coeff <- coeff[1:k,] + pval <- arimaSelect.out[[2]][1:k,] + aic <- arimaSelect.out$aic[1:k] + coeff[coeff==0] <- NA + n <- ncol(coeff) + if(missing(choix)) choix <- k + layout(matrix(c(1,1,1,2, + 3,3,3,2, + 3,3,3,4, + 5,6,7,7),nr=4), + widths=c(10,35,45,15), + heights=c(30,30,15,15)) + couleurs <- rainbow(75)[1:50]#(50) + ticks <- pretty(coeff) + par(mar=c(1,1,3,1)) + plot(aic,k:1-.5,type='o',pch=21,bg='blue',cex=2,axes=F,lty=2,xpd=NA) + points(aic[choix],k-choix+.5,pch=21,cex=4,bg=2,xpd=NA) + title('aic',line=2) + par(mar=c(3,0,0,0)) + plot(0,axes=F,xlab='',ylab='',xlim=range(ticks),ylim=c(.1,1)) + rect(xleft = min(ticks) + (0:49)/50*(max(ticks)-min(ticks)), + xright = min(ticks) + (1:50)/50*(max(ticks)-min(ticks)), + ytop = rep(1,50), + ybottom= rep(0,50),col=couleurs,border=NA) + axis(1,ticks) + rect(xleft=min(ticks),xright=max(ticks),ytop=1,ybottom=0) + text(mean(coeff,na.rm=T),.5,'coefficients',cex=2,font=2) + par(mar=c(1,1,3,1)) + image(1:n,1:k,t(coeff[k:1,]),axes=F,col=couleurs,zlim=range(ticks)) + for(i in 1:n) for(j in 1:k) if(!is.na(coeff[j,i])) { + if(pval[j,i]<.01) symb = 'green' + else if( (pval[j,i]<.05) & (pval[j,i]>=.01)) symb = 'orange' + else if( (pval[j,i]<.1) & (pval[j,i]>=.05)) symb = 'red' + else symb = 'black' + polygon(c(i+.5 ,i+.2 ,i+.5 ,i+.5), + c(k-j+0.5,k-j+0.5,k-j+0.8,k-j+0.5), + col=symb) + if(j==choix) { + rect(xleft=i-.5, + xright=i+.5, + ybottom=k-j+1.5, + ytop=k-j+.5, + lwd=4) + text(i, + k-j+1, + round(coeff[j,i],2), + cex=1.2, + font=2) + } + else{ + rect(xleft=i-.5,xright=i+.5,ybottom=k-j+1.5,ytop=k-j+.5) + text(i,k-j+1,round(coeff[j,i],2),cex=1.2,font=1) + } + } + axis(3,1:n,noms) + par(mar=c(0.5,0,0,0.5)) + plot(0,axes=F,xlab='',ylab='',type='n',xlim=c(0,8),ylim=c(-.2,.8)) + cols <- c('green','orange','red','black') + niv <- c('0','0.01','0.05','0.1') + for(i in 0:3){ + polygon(c(1+2*i ,1+2*i ,1+2*i-.5 ,1+2*i), + c(.4 ,.7 , .4 , .4), + col=cols[i+1]) + text(2*i,0.5,niv[i+1],cex=1.5) + } + text(8,.5,1,cex=1.5) + text(4,0,'p-value',cex=2) + box() + residus <- arimaSelect.out[[3]][[choix]]$res + par(mar=c(1,2,4,1)) + acf(residus,main='') + title('acf',line=.5) + par(mar=c(1,2,4,1)) + pacf(residus,main='') + title('pacf',line=.5) + par(mar=c(2,2,4,1)) + qqnorm(residus,main='') + title('qq-norm',line=.5) + qqline(residus) + residus + } > if (par2 == 0) x <- log(x) > if (par2 != 0) x <- x^par2 > (selection <- arimaSelect(x, order=c(par6,par3,par7), seasonal=list(order=c(par8,par4,par9), period=par5))) [[1]] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 0.8164311 0.1080770 -0.2008837 -0.6651088 0.02280733 0.8212337 0.4255221 [2,] 0.8230141 0.1037221 -0.1995028 -0.6723629 0.00000000 0.8250838 0.4573029 [3,] 1.0012213 0.0000000 -0.1660269 -0.8138606 0.00000000 0.8238714 0.4552402 [4,] NA NA NA NA 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 [[2]] [,1] [,2] [,3] [,4] [,5] [,6] [,7] [1,] 2e-05 0.09687 5e-05 0.00059 0.51114 0 0 [2,] 3e-05 0.11087 5e-05 0.00059 NA 0 0 [3,] 0e+00 NA 0e+00 0.00000 NA 0 0 [4,] NA NA NA NA 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.8164 0.1081 -0.2009 -0.6651 0.0228 0.8212 0.4255 s.e. 0.1916 0.0650 0.0488 0.1922 0.0347 0.0262 0.0682 sigma^2 estimated as 73.07: log likelihood = -1763.27, aic = 3542.54 [[3]][[2]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, method = "ML") Coefficients: ar1 ar2 ar3 ma1 sar1 sar2 sma1 0.8164 0.1081 -0.2009 -0.6651 0.0228 0.8212 0.4255 s.e. 0.1916 0.0650 0.0488 0.1922 0.0347 0.0262 0.0682 sigma^2 estimated as 73.07: log likelihood = -1763.27, aic = 3542.54 [[3]][[3]] Call: arima(x = series, order = order, seasonal = seasonal, include.mean = include.mean, fixed = last.arma$next.vector, method = "ML") Coefficients: ar1 ar2 ar3 ma1 sar1 sar2 sma1 0.8230 0.1037 -0.1995 -0.6724 0 0.8251 0.4573 s.e. 0.1938 0.0649 0.0485 0.1945 0 0.0245 0.0461 sigma^2 estimated as 73.18: log likelihood = -1763.5, aic = 3540.99 [[3]][[4]] NULL [[3]][[5]] NULL [[3]][[6]] NULL [[3]][[7]] NULL $aic [1] 3542.544 3540.995 3541.297 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 > postscript(file="/var/www/html/freestat/rcomp/tmp/1notf1296638344.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 = 492 Frequency = 1 [1] 3.489993e-01 -6.427676e+00 -1.370129e+00 -4.588376e-01 -1.782753e+00 [6] -3.880699e-01 3.227327e+01 4.994051e+00 -4.961379e+00 -1.236142e+00 [11] 9.445173e-01 5.387656e+00 1.295654e+00 3.929452e+00 -4.839804e-02 [16] 2.807686e+00 2.531608e+00 3.187568e+00 1.296887e+01 1.035338e+00 [21] -3.660352e+00 -1.820079e+00 2.744945e+00 4.572939e+00 3.890299e+00 [26] 6.943089e+00 -4.446717e+00 -5.287041e+00 -3.238836e-01 1.270540e+00 [31] 6.831958e+00 -1.590983e+00 -3.677142e+00 1.308653e+00 3.796277e+00 [36] -1.301931e+00 -1.270654e+00 -6.461270e+00 -5.924033e+00 -4.094627e+00 [41] -7.633726e+00 -2.827637e+00 7.036293e+00 6.493106e+00 -2.623801e+00 [46] -4.004867e+00 -1.378885e+01 -1.065221e+01 -1.981829e+00 -6.152045e+00 [51] -4.581958e+00 -5.836989e+00 3.339801e+00 -4.023407e+00 5.341969e+00 [56] 1.057742e+01 -1.161735e+01 -7.572530e+00 2.111955e+00 -9.644558e+00 [61] 1.856367e+01 -1.457645e+01 -1.651799e+01 -9.491928e+00 -6.293183e+00 [66] -1.600306e+01 -1.399968e-01 -8.589452e+00 -2.957975e+00 -3.124055e+00 [71] -2.350234e+00 1.221620e+01 -9.315924e+00 -4.460075e+00 4.636513e+00 [76] 5.681473e+00 -8.871186e-01 8.426971e+00 -5.039216e+00 -1.195126e+01 [81] 9.651467e+00 1.797833e+01 -1.439585e+01 1.119698e+01 -9.379486e+00 [86] -4.112727e+00 1.064738e+01 3.546349e+00 1.109289e-01 8.734069e+00 [91] 8.752489e+00 -5.878383e+00 -2.446705e+00 -1.381545e+00 5.051274e+00 [96] -8.233279e+00 3.097739e+00 7.641698e-01 -8.825954e+00 -4.009545e+00 [101] -4.357815e+00 -5.601567e+00 1.189985e+01 -1.291654e+00 -1.414574e+01 [106] -1.336715e+01 6.223689e+00 -1.513925e+00 -6.722360e+00 5.101928e+00 [111] 6.089265e+00 -1.058377e+01 1.511101e+00 3.052019e+00 1.921985e+00 [116] 1.079265e+01 -1.063092e+01 2.043114e+00 3.366229e+00 2.549464e+00 [121] 2.276729e+00 -2.021948e+00 -1.126647e+00 4.778790e+00 6.620857e-01 [126] 3.374350e+00 8.245615e+00 -1.403894e+00 7.417624e+00 3.262360e+00 [131] 1.032058e+00 5.036739e+00 3.154847e+00 8.023336e+00 -7.156843e+00 [136] 7.368569e+00 1.855635e+00 1.903980e+00 9.473750e+00 2.653888e+00 [141] 1.308500e+00 5.409623e+00 -1.890439e-01 4.108803e+00 2.914889e+00 [146] -3.243042e+00 5.941096e+00 2.813694e+00 -3.095273e+00 4.846141e+00 [151] 4.184442e+00 6.518735e+00 -3.783611e+00 -1.925585e+00 4.558812e+00 [156] 7.168756e+00 3.254501e+00 1.649554e+00 -5.889837e-01 2.459490e+00 [161] 3.747719e+00 2.556880e+00 1.275578e+01 3.094943e+00 4.148033e+00 [166] -9.226287e+00 2.803282e+00 -3.461715e-01 -1.454652e+00 7.866343e+00 [171] -2.115825e+00 9.375710e-01 -7.826489e+00 -5.440478e+00 -5.519476e+01 [176] -7.535765e+00 5.907260e+00 5.344783e+00 -4.679667e+00 -1.387753e+01 [181] 4.305265e+01 -7.881204e+00 1.834290e+01 -6.833084e-01 -3.027100e+00 [186] -2.557846e-01 -3.153955e+01 -3.590845e+00 5.873685e-02 6.400004e+00 [191] 4.344845e+00 -3.622264e+00 -2.206442e+01 3.852933e+00 -1.054049e+01 [196] -1.126388e-01 -4.205218e+00 5.640773e-01 1.471467e+01 1.223678e+00 [201] -5.647963e+00 -2.377000e+00 -2.321716e-01 1.080056e+00 2.383805e+01 [206] -4.057893e+00 7.474696e+00 4.281687e-03 3.428282e+00 1.366800e-01 [211] -2.608254e+00 -7.194284e-01 -2.871480e+00 2.285477e+00 4.122379e+00 [216] -9.977947e-01 -7.345099e+00 1.349259e+00 -1.459106e+01 1.877525e+00 [221] -5.199005e+00 3.376265e-01 -1.317943e+00 2.468434e-01 -7.488510e+00 [226] -1.526302e-01 -1.034131e+01 1.185571e+00 1.515706e+01 -3.132246e+00 [231] 5.939182e+00 -9.676913e-01 -8.255500e+00 1.618021e+00 -1.100667e+01 [236] 1.435567e+00 6.455910e+00 -1.113646e+00 -7.426457e-02 -4.104967e-01 [241] -1.155850e+01 1.751427e+00 5.056549e+00 -1.136876e+00 6.486212e+00 [246] -1.220337e+00 3.494285e+00 -1.766520e-01 -8.753860e-01 3.763995e-01 [251] 1.202156e+01 -1.500390e+00 5.325508e+00 -3.427782e-01 -5.847376e-01 [256] 7.922741e-01 -1.055574e+00 6.119353e-01 -7.907394e+00 1.278097e+00 [261] -4.080999e+00 4.637607e-01 -2.280572e+00 -1.227849e-01 -7.379760e+00 [266] 7.022464e-01 -1.572113e-01 -4.730012e-01 -3.563704e+00 1.287534e-01 [271] -2.258293e+00 5.875271e-02 5.318037e-01 -4.054737e-01 -9.133457e+00 [276] 1.202710e+00 1.543513e+01 -2.679239e+00 1.174965e+01 -1.681240e+00 [281] -9.531130e+00 2.207325e+00 -8.245610e+00 1.666278e+00 -3.517758e+00 [286] 2.833065e-01 6.350624e+00 -1.465217e+00 -2.706616e+00 2.371878e-01 [291] -1.179350e+01 1.774331e+00 4.127731e+00 -1.014532e+00 1.468749e+00 [296] -5.833933e-01 3.533935e+00 -6.002721e-01 -1.605955e+00 3.910430e-01 [301] 9.436879e+00 -1.295406e+00 6.953645e+00 -7.250340e-01 -9.790129e+00 [306] 2.072928e+00 4.128334e+00 -4.361454e-01 -6.540836e+00 9.615800e-01 [311] -1.673674e+00 9.065669e-02 -3.617089e+00 2.596025e-01 -6.345900e+00 [316] 6.443288e-01 -3.283271e+00 6.047278e-02 6.199491e+00 -1.405264e+00 [321] -5.516471e+00 7.016954e-01 2.533203e+00 -4.464931e-01 9.921519e+00 [326] -1.554065e+00 1.094559e+01 -1.322435e+00 -3.714523e+00 1.319099e+00 [331] -2.399256e-01 5.976268e-01 -2.968584e+00 6.329107e-01 -3.964988e+00 [336] 5.471866e-01 2.283288e+00 -5.835730e-01 -3.615126e+00 3.838998e-01 [341] 4.925862e+00 -8.805071e-01 -1.332638e+00 2.101989e-01 7.149596e+00 [346] -9.942859e-01 -1.743102e+00 5.091257e-01 1.229918e+01 -1.611289e+00 [351] -2.141240e+00 7.915911e-01 1.802669e+01 -2.257391e+00 -5.131365e-04 [356] 7.496691e-01 -1.770614e+01 3.463009e+00 7.642082e+00 -1.274104e+00 [361] -7.442471e+00 8.112213e-01 5.885233e+00 -1.148465e+00 -4.366777e+00 [366] 5.581274e-01 -5.701513e+00 8.131439e-01 9.155490e+00 -1.659799e+00 [371] 1.602745e+00 -2.530473e-01 1.958051e+01 -2.685507e+00 -1.949106e+01 [376] 3.746543e+00 1.082890e+00 1.296423e-01 7.581114e+00 -1.418981e+00 [381] 1.107089e+01 -1.633825e+00 -1.043127e+00 7.104982e-01 -5.990904e+00 [386] 1.453205e+00 7.591603e+00 -1.061518e+00 -2.809688e+00 5.159665e-01 [391] 3.643824e+00 -4.321047e-01 -9.505572e+00 1.551700e+00 6.509190e+00 [396] -1.136522e+00 1.332710e+01 -2.118027e+00 -1.260018e+00 6.799273e-01 [401] 6.095077e-01 4.755483e-01 -1.085132e+01 1.935123e+00 -3.227923e+00 [406] 2.859441e-01 4.228646e+00 -1.127608e+00 -6.550759e+00 -2.436843e-01 [411] -3.892689e+00 -1.038768e+01 1.026449e+00 7.940933e+00 5.526722e+01 [416] 6.418812e+00 -3.182050e+00 -3.765258e+00 -2.218248e+01 7.890055e+00 [421] -4.614651e+01 5.980647e+00 -7.832031e-01 -7.184663e+00 -2.729736e+00 [426] -1.238448e+00 3.567178e+01 -6.657456e+00 1.128693e-01 -1.489638e+01 [431] -1.130251e+01 7.818596e+00 1.662010e+01 -4.794370e+00 -2.873066e+00 [436] 6.620070e+00 5.824214e+00 -6.564297e+00 -1.199381e+01 -4.661622e+00 [441] -7.775243e+00 -2.062034e+01 2.921036e+00 -6.727692e+00 4.388175e-01 [446] -9.332018e+00 -1.350864e+01 3.208347e+00 -1.178123e+01 -1.139544e+01 [451] 2.179052e+01 5.127483e+00 -2.348432e+01 9.960717e+00 5.061589e-01 [456] 4.874789e+00 5.324345e+00 -4.564604e+00 -1.324764e+00 2.927394e+00 [461] -1.403953e+01 1.620455e+01 3.722322e+00 -6.286100e+00 -3.192122e+00 [466] 1.170421e+01 1.435436e+01 1.365802e+01 7.186574e-01 1.254977e+01 [471] 1.577516e+01 9.881536e-01 3.670498e+00 1.593471e+01 2.016459e+00 [476] 7.814584e-01 5.461653e+00 -8.960196e+00 2.881963e+00 8.272752e+00 [481] -1.072110e+00 -5.710737e+00 -6.343917e+00 -8.449180e+00 2.732052e+00 [486] -4.702919e+00 1.314645e+01 -4.580049e+00 -9.945079e+00 -5.915354e+00 [491] -9.683643e+00 -9.032545e+00 > postscript(file="/var/www/html/freestat/rcomp/tmp/2akj71296638344.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/freestat/rcomp/tmp/3qjk31296638344.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/freestat/rcomp/tmp/4x5hv1296638344.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/freestat/rcomp/tmp/5fxp81296638344.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/freestat/rcomp/tmp/6xmnl1296638344.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/freestat/rcomp/tmp/7aen81296638344.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/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/8i6581296638344.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/freestat/rcomp/tmp/9tabe1296638344.tab") > > try(system("convert tmp/1notf1296638344.ps tmp/1notf1296638344.png",intern=TRUE)) character(0) > try(system("convert tmp/2akj71296638344.ps tmp/2akj71296638344.png",intern=TRUE)) character(0) > try(system("convert tmp/3qjk31296638344.ps tmp/3qjk31296638344.png",intern=TRUE)) character(0) > try(system("convert tmp/4x5hv1296638344.ps tmp/4x5hv1296638344.png",intern=TRUE)) character(0) > try(system("convert tmp/5fxp81296638344.ps tmp/5fxp81296638344.png",intern=TRUE)) character(0) > try(system("convert tmp/6xmnl1296638344.ps tmp/6xmnl1296638344.png",intern=TRUE)) character(0) > try(system("convert tmp/7aen81296638344.ps tmp/7aen81296638344.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 23.636 2.348 24.719