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(92.66,94.2,94.37,94.45,94.62,94.37,93.43,94.79,94.88,94.79,94.62,94.71,93.77,95.73,95.99,95.82,95.47,95.82,94.71,96.33,96.5,96.16,96.33,96.33,95.05,96.84,96.92,97.44,97.78,97.69,96.67,98.29,98.2,98.71,98.54,98.2,96.92,99.06,99.65,99.82,99.99,100.33,99.31,101.1,101.1,100.93,100.85,100.93,99.6,101.88,101.81,102.38,102.74,102.82,101.72,103.47,102.98,102.68,102.9,103.03,101.29) > 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/1sif31228736631.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/2lplv1228736631.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.378021290 -0.017496196 -0.018432907 -0.004782467 [6] -0.431410097 0.817585972 -0.374714922 -0.018202973 -0.050408236 [11] -0.010331046 -0.372523315 0.738891897 -0.289765100 0.023479212 [16] -0.024044289 -0.025389175 -0.351582852 0.622482675 -0.276989739 [21] 0.001636561 -0.021898232 -0.048402182 -0.321389448 0.556908777 [26] -0.199968124 0.039430391 -0.009884745 -0.042577034 -0.246249049 [31] 0.449853767 -0.193476581 0.014372019 -0.017892417 -0.052432222 [36] -0.216307867 0.373386139 -0.131221143 0.032703642 0.019389086 [41] -0.018417075 -0.159607216 0.268005448 -0.113684374 0.011556321 [46] 0.015516402 -0.023896403 -0.138128748 0.173577179 -0.045517569 [51] 0.013929092 0.034682956 -0.001315390 -0.081699036 0.088520846 [56] -0.003288261 -0.013701232 0.004653535 -0.001411242 -0.054101720 > (mypacf <- c(rpacf$acf)) [1] -0.378021290 -0.187138385 -0.117312030 -0.076009331 -0.579381125 [6] 0.666765748 -0.216902662 -0.053750218 -0.218053207 -0.209428259 [11] 0.111911558 0.042263664 0.172372602 0.011756865 0.067762278 [16] -0.069294154 -0.056395717 -0.040854599 -0.105803242 -0.049475922 [21] -0.045071282 -0.055721211 -0.056017131 -0.035534362 0.042644337 [26] 0.043657332 -0.091929738 -0.019513785 0.118301130 -0.089366699 [31] -0.029091694 -0.170228204 -0.008445601 0.061248239 -0.095914519 [36] 0.010325585 -0.022492659 0.031724888 0.043903611 0.037121810 [41] 0.074262890 -0.159430387 -0.013334008 -0.044468390 0.056654886 [46] 0.082980398 -0.074283124 -0.004696781 0.111593740 -0.038134170 [51] 0.040098065 -0.014561199 0.030912871 -0.016735597 -0.015543404 [56] 0.067718392 -0.074477067 0.063826802 -0.015880096 > 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/3tqzx1228736632.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/4xo181228736632.tab") > > system("convert tmp/1sif31228736631.ps tmp/1sif31228736631.png") > system("convert tmp/2lplv1228736631.ps tmp/2lplv1228736631.png") > > > proc.time() user system elapsed 0.593 0.332 0.713