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(0.60773,0.58933,0.60039,0.61342,0.6348,0.634,0.62915,0.62168,0.61328,0.6089,0.60857,0.62672,0.62291,0.62393,0.61838,0.62012,0.61659,0.6116,0.61573,0.61407,0.62823,0.64405,0.6387,0.63633,0.63059,0.62994,0.63709,0.64217,0.65711,0.66977,0.68255,0.68902,0.71322,0.70224,0.70045,0.69919,0.69693,0.69763,0.69278,0.70196,0.69215,0.6769,0.67124,0.66532,0.67157,0.66428,0.66576,0.66942,0.6813,0.69144,0.69862,0.695,0.69867,0.68968,0.69233,0.68293,0.68399,0.66895,0.68756,0.68527,0.6776,0.68137,0.67933,0.67922,0.68598,0.68297,0.68935,0.69463,0.6833,0.68666,0.68782,0.67669,0.67511,0.67254,0.67397,0.67286,0.66341,0.668,0.68021,0.67934,0.68136,0.67562,0.6744,0.67766,0.68887,0.69614,0.70896,0.72064) > 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/1gkmy1228755926.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/2xo0v1228755926.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.1148095704 0.1238060147 -0.0859880376 -0.1112714293 [6] -0.0746379878 -0.0597999164 -0.0066153830 0.0765438264 0.0250690758 [11] -0.0866472530 0.0019772274 -0.0850576252 -0.2516978941 -0.0564594020 [16] -0.0850326159 0.0839002413 0.1524595125 0.0680415769 0.0987275719 [21] -0.0574988864 -0.0358819527 -0.0530976143 -0.1096712153 -0.0114235708 [26] -0.1482839747 0.1315226490 -0.0266558617 0.1664285033 0.0058747649 [31] -0.0083493565 -0.1240359098 -0.0187842644 0.0007035883 -0.0103470894 [36] 0.1198971261 -0.0397751952 0.0240467577 0.0473522691 -0.0537217323 [41] -0.0019391607 -0.0569532588 -0.1471469762 -0.0433690926 -0.0911156414 [46] 0.0042883648 0.0333134941 0.0040579763 0.0114921365 > (mypacf <- c(rpacf$acf)) [1] 0.114809570 0.112102426 -0.114405942 -0.107720632 -0.027826950 [6] -0.031277958 -0.004449832 0.072119370 -0.007178428 -0.127741701 [11] 0.030186691 -0.047875951 -0.273751584 0.001022401 -0.026336778 [16] 0.021646921 0.112485697 0.006959105 0.024388365 -0.070782651 [21] 0.030613675 -0.020736243 -0.160527227 0.025543322 -0.213392197 [26] 0.098321163 -0.029773364 0.104553954 0.031167582 -0.009819117 [31] -0.070123703 0.053310625 -0.021447830 -0.066996456 0.042871532 [36] -0.120526008 -0.025858959 0.046250560 0.019768870 -0.033438746 [41] 0.053274772 -0.110556440 -0.087651103 -0.102297493 -0.048442003 [46] -0.045986537 -0.048438219 0.046342122 > 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/3api71228755926.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/43oc21228755926.tab") > > system("convert tmp/1gkmy1228755926.ps tmp/1gkmy1228755926.png") > system("convert tmp/2xo0v1228755926.ps tmp/2xo0v1228755926.png") > > > proc.time() user system elapsed 0.586 0.333 0.701