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. 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(1375.06,1334.38,1335.61,1307.24,1183.2,1187.79,1270.81,1238.67,1204.45,1178.5,1044.64,1076.59,1129.68,1144.93,1140.21,1100.29,1153.79,1114.2,1079.27,1014.05,903.69,912.55,867.81,854.54,911.17,899.26,895.87,837.61,846.62,890.19,935.96,988,992.55,989.53,1019.44,1038.73,1049.9,1080.64,1132.52,1143.37,1123.98,1133.07,1102.78,1132.76,1105.85,1088.93,1117.66,1118.07,1168.94,1199.21,1181.4,1199.63,1194.9,1164.42,1178.28,1202.25,1222.24,1224.27,1225.91,1191.96,1237.37,1262.07,1278.72,1276.65,1293.83,1302.18,1290,1253.12,1260.24,1287.15,1317.81,1363.38,1388.63,1416.42,1424.16,1444.65,1406.95,1463.65,1511.14,1514.49,1520.98,1454.62,1497.12,1539.66,1463.39,1479.23,1378.76,1354.87,1316.94,1370.47,1403.22,1341.25,1257.33,1281.47,1216.93,969.13,883.04) > par5 = '12' > par4 = '0' > par3 = '1' > 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: 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/1umf81229013639.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/25p8i1229013639.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.0000000000 0.2155847766 -0.0123026541 0.1058713153 0.0100587913 [6] 0.1212070867 0.0224395013 0.0876325424 0.0929873900 0.0582817617 [11] 0.1215931016 0.0347645765 -0.0086209851 -0.0265143385 -0.0098564030 [16] 0.0099591603 -0.0208754301 0.0142751034 0.0002147103 0.0326248824 [21] -0.0621867075 -0.1080099501 0.0042909653 -0.0006362308 -0.0596896209 [26] 0.0060833123 -0.0731654020 -0.0292206050 -0.0419087479 -0.0231164030 [31] -0.0492597704 -0.0356897403 0.0346713582 -0.0463184406 -0.0241203428 [36] -0.0534108080 -0.0048649297 -0.0050531791 -0.0857162175 -0.0128410619 [41] -0.0002088433 -0.0086846534 0.0442294993 -0.0160544807 -0.0220825769 [46] -0.0450695645 -0.0517935548 -0.0797194229 -0.0247662620 0.0051838913 [51] -0.0698230123 -0.0584437799 -0.0724818790 -0.0515982850 -0.0259493215 [56] -0.0579737107 -0.0763524540 -0.1291737982 -0.0908494211 0.0121996305 [61] -0.1215581255 > (mypacf <- c(rpacf$acf)) [1] 0.215584777 -0.061644488 0.128410064 -0.046897869 0.150916323 [6] -0.062061451 0.132172631 0.004077429 0.072558691 0.061342913 [11] 0.001153314 -0.037251171 -0.046933356 -0.008582138 -0.022130780 [16] -0.023197957 0.006785262 -0.016404186 0.044475758 -0.101048186 [21] -0.050564136 0.022925608 0.020071891 -0.062852150 0.055211729 [26] -0.097993752 0.036815697 -0.064587943 0.053684773 -0.084228403 [31] 0.074244147 -0.003896671 -0.021475641 -0.007868033 -0.040296462 [36] 0.044165504 -0.031297814 -0.044341145 0.004180662 0.014951158 [41] -0.012031894 0.040592929 -0.001994599 -0.024124602 -0.024574345 [46] -0.042887469 -0.085884849 0.023392368 0.001635944 -0.084509323 [51] -0.031351437 -0.061035668 0.003862650 -0.025797618 -0.004919797 [56] -0.065733231 -0.075100214 -0.038964003 0.019145697 -0.105829870 > 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/3uesc1229013639.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/4xaaj1229013639.tab") > > system("convert tmp/1umf81229013639.ps tmp/1umf81229013639.png") > system("convert tmp/25p8i1229013639.ps tmp/25p8i1229013639.png") > > > proc.time() user system elapsed 0.579 0.304 1.092