R version 2.7.0 (2008-04-22) 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. 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(2196.72,2350.44,2440.25,2408.64,2472.81,2407.6,2454.62,2448.05,2497.84,2645.64,2756.76,2849.27,2921.44,2981.85,3080.58,3106.22,3119.31,3061.26,3097.31,3161.69,3257.16,3277.01,3295.32,3363.99,3494.17,3667.03,3813.06,3917.96,3895.51,3801.06,3570.12,3701.61,3862.27,3970.1,4138.52,4199.75,4290.89,4443.91,4502.64,4356.98,4591.27,4696.96,4621.4,4562.84,4202.52,4296.49,4435.23,4105.18,4116.68,3844.49,3720.98,3674.4,3857.62,3801.06,3504.37,3032.6,3047.03,2962.34,2197.82,2014.45) > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1' > par1 = '60' > ylab = '' > xlab = '' > main = '' > #'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!) > 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 (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/19w1u1229937436.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > racf <- acf(x,par1,main='Autocorrelation',xlab='lags',ylab='ACF') > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2mjau1229937436.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.000000000 0.286693984 0.063159839 0.229069048 0.188413552 [6] 0.221848807 0.082128491 0.054036654 0.166745413 0.122206622 [11] 0.058435768 0.259126865 0.043147382 -0.027308533 0.188884476 [16] 0.051163618 0.037413744 -0.067782303 -0.155465314 0.020977751 [21] -0.033852677 -0.104251021 -0.112353500 -0.100272829 -0.094523458 [26] 0.030406847 -0.033849843 -0.043509990 0.027571325 -0.036199396 [31] -0.046661451 -0.076386942 -0.070781276 -0.116728307 -0.107203192 [36] -0.129985488 -0.041307038 -0.037139108 -0.080303337 -0.039128451 [41] -0.075489356 -0.044452782 -0.035515941 -0.089236305 -0.062326294 [46] -0.106352867 -0.109143928 -0.084090237 -0.090511549 -0.097085973 [51] -0.024649784 -0.006014817 -0.029395492 -0.031440998 -0.060111867 [56] 0.002610455 -0.043012990 -0.074704364 -0.015511641 > (mypacf <- c(rpacf$acf)) [1] 0.286693984 -0.020738140 0.236024298 0.067254827 0.179784680 [6] -0.072017375 0.020931534 0.071112513 0.027337870 -0.009356432 [11] 0.248640010 -0.170737327 -0.018122609 0.113428571 -0.074244305 [16] -0.008498337 -0.131389914 -0.142804467 -0.003340853 -0.046135172 [21] 0.003239552 -0.147596214 0.018846214 -0.052434437 0.079632976 [26] 0.049183711 0.073156500 0.056954251 0.059973818 -0.103001109 [31] 0.013629218 0.010624941 -0.102320035 -0.031991974 -0.123466403 [36] 0.029861508 -0.026930585 0.020128106 -0.071491022 -0.089102591 [41] 0.020452465 -0.017781981 -0.032993905 0.066034400 -0.086826360 [46] 0.011125146 -0.018271350 -0.024439586 0.040321209 0.070000698 [51] 0.031948477 -0.015841496 -0.060713184 0.025187630 -0.049048510 [56] -0.029623500 -0.086458986 -0.004646817 > 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/3snpg1229937436.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/4uaax1229937436.tab") > system("convert tmp/19w1u1229937436.ps tmp/19w1u1229937436.png") > system("convert tmp/2mjau1229937436.ps tmp/2mjau1229937436.png") > > > proc.time() user system elapsed 1.544 0.562 1.640