R version 2.6.0 (2007-10-03) Copyright (C) 2007 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(103.9,104.5,106.3,108.6,110.0,110.4,109.8,108.8,108.9,109.7,110.4,111.5,112.7,113.8,113.9,113.4,113.8,114.1,113.5,113.9,116.1,118.4,120.5,122.0,121.4,120.5,120.8,110.4,109.3,108.9,110.0,112.3,114.5,114.8,113.3,112.2,112.8,113.8,114.2,114.7,115.2,115.0,114.9,114.4,113.8,114.5,116.0,116.7,116.4,116.0,115.9,115.4,115.2,115.8) > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1.5' > par1 = '48' > #'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/1oujw1196769162.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/29a4b1196769162.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.262783008 0.096099222 -0.102981305 -0.319563488 [6] -0.319683833 -0.161081804 -0.005577622 0.127383962 0.156663085 [11] 0.086841459 0.020237830 -0.030643298 -0.080925831 -0.068134924 [16] -0.053013946 0.009261300 0.067107757 -0.005639045 -0.004467490 [21] 0.088578739 0.069860499 -0.009269166 -0.070670473 -0.096389631 [26] -0.089131952 -0.041885585 0.034500656 0.039338104 0.021947351 [31] -0.016533140 -0.052832819 -0.042697631 0.002418755 0.026172514 [36] 0.021490378 0.020105588 0.012614334 -0.015451239 -0.036885869 [41] -0.034360982 -0.013728647 0.011896264 0.026586160 0.022747084 [46] 0.002452223 -0.014975413 -0.017996538 -0.015532881 > (mypacf <- c(rpacf$acf)) [1] 0.262783008 0.029050384 -0.145281414 -0.286679904 -0.190496437 [6] -0.022451281 0.027348348 0.028080503 -0.022183542 -0.064592928 [11] -0.024648343 0.019150347 -0.007515690 -0.015946409 -0.043651318 [16] 0.007621691 0.046846432 -0.071774733 -0.041768201 0.115715832 [21] 0.089281474 -0.049038326 -0.115936115 -0.052049756 0.018368166 [26] 0.031010364 0.018281149 -0.077399126 -0.096493593 -0.051962654 [31] -0.012257466 0.005428752 0.005823803 -0.015328304 -0.033578867 [36] -0.033874930 -0.023015462 -0.001673286 0.010879188 -0.011652564 [41] -0.041501138 -0.028629350 0.004258510 0.015978179 0.004878937 [46] -0.016578566 -0.029688634 -0.025355187 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > 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 1:par1) { + 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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/34guh1196769162.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-1,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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/49tms1196769162.tab") > > system("convert tmp/1oujw1196769162.ps tmp/1oujw1196769162.png") > system("convert tmp/29a4b1196769162.ps tmp/29a4b1196769162.png") > > > proc.time() user system elapsed 0.895 0.328 1.052