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) > par20 = '' > par19 = '' > par18 = '' > par17 = '' > par16 = '' > par15 = '' > par14 = '' > par13 = '' > par12 = '' > par11 = '' > par10 = '' > par9 = '' > par8 = '' > par7 = '' > par6 = '' > par5 = '12' > par4 = '0' > par3 = '0' > par2 = '1.3' > 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/1gwak1228770889.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/2o8xt1228770889.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.92072064 0.87616549 0.83318779 0.79156546 0.74780915 [7] 0.73371783 0.64804137 0.59885340 0.55021512 0.50492182 0.46003162 [13] 0.44558640 0.36986971 0.32815325 0.28553814 0.24102900 0.19235644 [19] 0.17542776 0.10288323 0.06196615 0.02289180 -0.01824679 -0.05430136 [25] -0.06066484 -0.11615357 -0.14609086 -0.18200161 -0.21442266 -0.23813254 [31] -0.24313804 -0.28839680 -0.30839405 -0.33208532 -0.34829656 -0.35942072 [37] -0.35558093 -0.38669695 -0.39407102 -0.39919457 -0.40389572 -0.40789593 [43] -0.39434031 -0.40477617 -0.39480306 -0.38401092 -0.37856499 -0.37324186 [49] -0.35410885 -0.35176789 -0.32893023 -0.30745346 -0.28439548 -0.25816539 [55] -0.22347404 -0.19914006 -0.16268907 -0.13114575 -0.10192246 -0.06994487 [61] -0.03097583 > (mypacf <- c(rpacf$acf)) [1] 0.920720636 0.186762613 0.035315427 0.001480005 -0.029608133 [6] 0.173610408 -0.424844708 0.071930194 -0.001175519 0.004586265 [11] 0.015278020 0.080729362 -0.209396876 0.017506631 -0.013439768 [16] -0.053177338 -0.049154964 0.046172759 -0.144672479 -0.011704928 [21] 0.005545402 -0.037662373 0.049661984 0.021110095 -0.078252144 [26] -0.051815705 -0.088142743 0.007626491 0.043691078 -0.063853447 [31] -0.027546637 -0.016033726 -0.026199099 0.034873698 -0.008663451 [36] -0.046817942 -0.036166600 -0.014943197 0.032421135 -0.037191897 [41] -0.044300084 0.020840730 0.045301107 -0.009051488 0.018871413 [46] -0.054236058 -0.048618343 -0.007306796 0.035272605 0.025121402 [51] 0.020656203 0.060668026 0.033582067 -0.009861345 0.056198055 [56] 0.007274876 -0.010372224 -0.009755960 0.026907269 0.018114235 > 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/3p4df1228770889.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/4ovbs1228770889.tab") > > system("convert tmp/1gwak1228770889.ps tmp/1gwak1228770889.png") > system("convert tmp/2o8xt1228770889.ps tmp/2o8xt1228770889.png") > > > proc.time() user system elapsed 0.592 0.319 0.705