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(277 + ,260.6 + ,291.6 + ,275.4 + ,275.3 + ,231.7 + ,238.8 + ,274.2 + ,277.8 + ,299.1 + ,286.6 + ,232.3 + ,294.1 + ,267.5 + ,309.7 + ,280.7 + ,287.3 + ,235.7 + ,256.4 + ,289 + ,290.8 + ,321.9 + ,291.8 + ,241.4 + ,295.5 + ,258.2 + ,306.1 + ,281.5 + ,283.1 + ,237.4 + ,274.8 + ,299.3 + ,300.4 + ,340.9 + ,318.8 + ,265.7 + ,322.7 + ,281.6 + ,323.5 + ,312.6 + ,310.8 + ,262.8 + ,273.8 + ,320 + ,310.3 + ,342.2 + ,320.1 + ,265.6 + ,327 + ,300.7 + ,346.4 + ,317.3 + ,326.2 + ,270.7 + ,278.2 + ,324.6 + ,321.8 + ,343.5 + ,354 + ,278.2 + ,330.2 + ,307.3 + ,375.9 + ,335.3 + ,339.3 + ,280.3 + ,293.7 + ,341.2 + ,345.1 + ,368.7 + ,369.4 + ,288.4 + ,341 + ,319.1 + ,374.2 + ,344.5 + ,337.3 + ,281 + ,282.2 + ,321 + ,325.4 + ,366.3 + ,380.3 + ,300.7 + ,359.3 + ,327.6 + ,383.6 + ,352.4 + ,329.4 + ,294.5 + ,333.5 + ,334.3 + ,358 + ,396.1 + ,387 + ,307.2 + ,363.9 + ,344.7 + ,397.6 + ,376.8 + ,337.1 + ,299.3 + ,323.1 + ,329.1 + ,347 + ,462 + ,436.5 + ,360.4 + ,415.5 + ,382.1 + ,432.2 + ,424.3 + ,386.7 + ,354.5 + ,375.8 + ,368 + ,402.4 + ,426.5 + ,433.3 + ,338.5 + ,416.8 + ,381.1 + ,445.7 + ,412.4 + ,394 + ,348.2 + ,380.1 + ,373.7 + ,393.6 + ,434.2 + ,430.7 + ,344.5 + ,411.9 + ,370.5 + ,437.3 + ,411.3 + ,385.5 + ,341.3 + ,384.2 + ,373.2 + ,415.8 + ,448.6 + ,454.3 + ,350.3 + ,419.1 + ,398 + ,456.1 + ,430.1 + ,399.8 + ,362.7 + ,384.9 + ,385.3 + ,432.3 + ,468.9 + ,442.7 + ,370.2 + ,439.4 + ,393.9 + ,468.7 + ,438.8 + ,430.1 + ,366.3 + ,391 + ,380.9 + ,431.4 + ,465.4 + ,471.5 + ,387.5 + ,446.4 + ,421.5 + ,504.8 + ,492.1 + ,421.3 + ,396.7 + ,428 + ,421.9 + ,465.6 + ,525.8 + ,499.9 + ,435.3 + ,479.5 + ,473 + ,554.4 + ,489.6 + ,462.2 + ,420.3) > par7 = '0.95' > par6 = 'MA' > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1' > par1 = '60' > #'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: > if (par1 == 'Default') { + par1 = 10*log10(length(x)) + } else { + par1 <- as.numeric(par1) + } > par2 <- as.numeric(par2) > par3 <- as.numeric(par3) > par4 <- as.numeric(par4) > par5 <- as.numeric(par5) > if (par6 == 'White Noise') par6 <- 'white' else par6 <- 'ma' > par7 <- as.numeric(par7) > if (par2 == 0) { + x <- log(x) + } else { + x <- (x ^ par2 - 1) / par2 + } > if (par3 > 0) x <- diff(x,lag=1,difference=par3) > if (par4 > 0) x <- diff(x,lag=par5,difference=par4) > postscript(file="/var/www/html/rcomp/tmp/12y301263295269.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > racf <- acf(x, par1, main='Autocorrelation', xlab='time lag', ylab='ACF', ci.type=par6, ci=par7, sub=paste('(lambda=',par2,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='')) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2110g1263295269.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > rpacf <- pacf(x,par1,main='Partial Autocorrelation',xlab='lags',ylab='PACF') > dev.off() null device 1 > (myacf <- c(racf$acf)) [1] 1.00000000 0.79082401 0.73474715 0.63080156 0.66036412 0.70893000 [7] 0.77040688 0.66777684 0.58833205 0.51705372 0.58929536 0.62152908 [13] 0.78123241 0.59959421 0.55543732 0.46065026 0.48724942 0.53983192 [19] 0.59473837 0.50380412 0.43646747 0.37223614 0.44635716 0.47427207 [25] 0.62731330 0.46095524 0.42033434 0.32868724 0.35217940 0.40719677 [31] 0.45322039 0.37513357 0.31450735 0.24553481 0.31190955 0.34321234 [37] 0.48180754 0.33528295 0.29893195 0.21614422 0.23725045 0.28799190 [43] 0.33072883 0.25573589 0.20248594 0.13529213 0.19784975 0.22652071 [49] 0.34990342 0.21796168 0.18977244 0.11324423 0.12633363 0.18218833 [55] 0.21869040 0.15034011 0.10240109 0.04004869 0.09542808 0.12622525 [61] 0.23681090 > (mypacf <- c(rpacf$acf)) [1] 0.790824012 0.291898821 -0.033515995 0.289802149 0.331209576 [6] 0.272448508 -0.245093956 -0.182077686 0.004894653 0.293660164 [11] 0.024924827 0.499697939 -0.548126490 -0.084651374 -0.005796299 [16] -0.040258113 0.014692595 -0.002759165 0.098003785 0.033931720 [21] 0.086372308 0.045667367 -0.060679543 0.150667432 -0.219883336 [26] -0.119557737 -0.054660382 0.013698414 0.056679876 -0.031037573 [31] 0.152137450 0.027060579 -0.028913379 -0.060940046 0.025456064 [36] -0.029974359 -0.069795175 -0.034814265 0.029624804 0.043336286 [41] -0.051903087 0.037988606 -0.036677316 0.048791940 0.002252691 [46] -0.065798331 0.010243710 -0.042695332 0.010220556 0.010448479 [51] 0.004238462 -0.051428215 0.044851720 0.014926227 -0.036777115 [56] -0.023130760 0.034870097 -0.013918785 -0.001683924 -0.022366865 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #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,'Autocorrelation Function',4,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Time lag k',header=TRUE) > a<-table.element(a,hyperlink('http://www.xycoon.com/basics.htm','ACF(k)','click here for more information about the Autocorrelation Function'),header=TRUE) > a<-table.element(a,'T-STAT',header=TRUE) > a<-table.element(a,'P-value',header=TRUE) > a<-table.row.end(a) > for (i in 2:(par1+1)) { + a<-table.row.start(a) + a<-table.element(a,i-1,header=TRUE) + a<-table.element(a,round(myacf[i],6)) + mytstat <- myacf[i]*sqrtn + a<-table.element(a,round(mytstat,4)) + a<-table.element(a,round(1-pt(abs(mytstat),lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/37sgc1263295269.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Partial Autocorrelation Function',4,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Time lag k',header=TRUE) > a<-table.element(a,hyperlink('http://www.xycoon.com/basics.htm','PACF(k)','click here for more information about the Partial Autocorrelation Function'),header=TRUE) > a<-table.element(a,'T-STAT',header=TRUE) > a<-table.element(a,'P-value',header=TRUE) > a<-table.row.end(a) > for (i in 1:par1) { + a<-table.row.start(a) + a<-table.element(a,i,header=TRUE) + a<-table.element(a,round(mypacf[i],6)) + mytstat <- mypacf[i]*sqrtn + a<-table.element(a,round(mytstat,4)) + a<-table.element(a,round(1-pt(abs(mytstat),lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/48u6c1263295270.tab") > > try(system("convert tmp/12y301263295269.ps tmp/12y301263295269.png",intern=TRUE)) character(0) > try(system("convert tmp/2110g1263295269.ps tmp/2110g1263295269.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.587 0.321 0.702