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(1.63,1.63,1.62,1.62,1.61,1.6,1.6,1.6,1.59,1.59,1.58,1.58,1.58,1.58,1.58,1.58,1.56,1.56,1.55,1.55,1.55,1.54,1.54,1.53,1.53,1.53,1.53,1.52,1.52,1.52,1.52,1.51,1.51,1.51,1.5,1.49,1.49,1.49,1.48,1.47,1.47,1.47,1.46,1.46,1.45,1.45,1.44,1.43,1.43,1.43,1.42,1.41,1.4,1.4,1.4,1.4,1.39,1.38,1.38,1.38,1.37,1.37,1.37,1.37,1.37,1.37,1.37,1.36,1.36,1.36,1.35,1.34,1.34,1.34,1.34,1.34,1.34,1.34,1.33,1.33,1.33,1.32,1.32,1.32,1.32) > par5 = '12' > par4 = '0' > par3 = '1' > par2 = '1' > 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/1eczg1229519695.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/222wo1229519695.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.165897557 -0.155097158 -0.022264731 0.098419710 [6] 0.016453683 -0.036246746 -0.025446346 0.170886908 -0.206496016 [11] -0.010162762 0.215436092 -0.069180405 0.063652021 -0.018314007 [16] -0.007513607 -0.025978807 -0.032296022 0.042005206 0.082071205 [21] -0.156162078 0.132937604 -0.105295680 0.044654361 -0.100812495 [26] 0.002754332 0.042820331 -0.178295338 -0.028345297 0.121604743 [31] -0.023862112 -0.013061713 -0.065762141 -0.054961742 0.112105914 [36] -0.045508927 0.133706713 -0.058143357 -0.169374984 0.044075885 [41] 0.084141884 -0.090590571 0.059359470 -0.022606558 0.080960269 [46] -0.157273014 0.009794641 0.084095869 -0.014987773 > (mypacf <- c(rpacf$acf)) [1] -0.165897557 -0.187787443 -0.089513600 0.050444524 0.031102969 [6] -0.001556456 -0.018312876 0.162903811 -0.169637074 -0.029507279 [11] 0.186304863 -0.052367989 0.141317385 0.042410335 -0.015076268 [16] -0.059763418 -0.007709503 -0.007931033 0.022192255 -0.038946478 [21] 0.097553743 -0.127616130 0.052910284 -0.162204133 -0.058339488 [26] 0.009519427 -0.243842989 0.001879085 -0.003843158 0.005331745 [31] 0.030942403 -0.092397934 -0.056815296 -0.002113060 0.091945102 [36] 0.166956608 -0.013877829 -0.031458667 -0.023748777 0.023881311 [41] -0.043304319 -0.017263235 0.101342618 0.032256802 -0.093591916 [46] 0.040156871 -0.146227038 -0.033312430 > 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/3czbn1229519695.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/4rog51229519696.tab") > > system("convert tmp/1eczg1229519695.ps tmp/1eczg1229519695.png") > system("convert tmp/222wo1229519695.ps tmp/222wo1229519695.png") > > > proc.time() user system elapsed 0.640 0.347 1.435