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(9.733,9.259,9.864,9.215,10.103,9.380,9.896,10.117,9.451,9.700,9.081,9.084,9.743,8.587,9.731,9.563,9.998,9.437,10.038,9.918,9.252,9.737,9.035,9.133,9.487,8.700,9.627,8.947,9.283,8.829,9.947,9.628,9.318,9.605,8.640,9.214,9.567,8.547,9.185,9.470,9.123,9.278,10.170,9.434,9.655,9.429,8.739,9.552,9.687,9.019,9.672,9.206,9.069,9.788,10.312,10.105,9.863,9.656,9.295,9.946,9.701,9.049,10.190,9.706,9.765,9.893,9.994,10.433,10.073,10.112,9.266,9.820,10.097,9.115,10.411,9.678,10.408,10.153,10.368,10.581,10.597,10.680,9.738,9.556) > par5 = '12' > par4 = '0' > par3 = '0' > 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/1askt1228576190.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/25n871228576190.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.2619146511 0.4042201477 0.3440732870 0.0903853229 [6] 0.2171100836 0.1010985616 0.1228473871 0.0527818545 0.2630336670 [11] 0.1853345281 0.1350997509 0.6008580744 0.0868004092 0.2811178604 [16] 0.1622251970 -0.0471873469 0.0650276777 -0.0007635674 -0.0549033991 [21] -0.0506036327 0.0523241791 -0.0103816569 0.0366643090 0.3016969251 [26] -0.0643345017 0.0946804967 -0.0058985295 -0.2005618889 -0.1214706086 [31] -0.2042947226 -0.2238461982 -0.1193335691 -0.1217097791 -0.1433359953 [36] -0.1042717272 0.0759633398 -0.1352818486 -0.0142818692 -0.1080785534 [41] -0.2373516834 -0.1283464523 -0.2720055718 -0.2089490791 -0.1876658528 [46] -0.1812026870 -0.0978183009 -0.1460750359 0.0561910598 > (mypacf <- c(rpacf$acf)) [1] 0.261914651 0.360339924 0.224530162 -0.167203159 0.031357931 [6] 0.029979765 0.070162872 -0.081320223 0.274011343 0.130017406 [11] -0.081699834 0.529041757 -0.194140340 -0.183145116 -0.115625801 [16] -0.052530886 -0.129424772 0.080859314 -0.047100400 -0.015234154 [21] -0.119371892 0.057042718 0.057774931 0.015626640 -0.097825696 [26] -0.120542111 -0.026485905 -0.075209855 -0.120076824 -0.100081035 [31] 0.078003891 0.113732159 -0.050984883 -0.038642126 -0.076128468 [36] -0.043702869 0.038292490 0.045548315 -0.034884849 -0.005097659 [41] 0.057293219 -0.079272024 0.093704069 -0.130170406 -0.054100821 [46] 0.140161041 -0.001834056 0.039085111 > 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/30hcr1228576190.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/48hni1228576190.tab") > > system("convert tmp/1askt1228576190.ps tmp/1askt1228576190.png") > system("convert tmp/25n871228576190.ps tmp/25n871228576190.png") > > > proc.time() user system elapsed 0.549 0.299 0.782