R version 2.9.0 (2009-04-17) Copyright (C) 2009 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(612613,611324,594167,595454,590865,589379,584428,573100,567456,569028,620735,628884,628232,612117,595404,597141,593408,590072,579799,574205,572775,572942,619567,625809,619916,587625,565742,557274,560576,548854,531673,525919,511038,498662,555362,564591,541657,527070,509846,514258,516922,507561,492622,490243,469357,477580,528379,533590,517945,506174,501866,516141,528222,532638,536322,536535,523597,536214,586570,596594) > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '1' > par3 = '1' > par2 = '1' > par1 = '60' > #'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: > 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 (par6 == 'White Noise') par6 <- 'white' else par6 <- 'ma' > par7 <- as.numeric(par7) > 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/1czq21261923442.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > racf <- acf(x, par1, main='Autocorrelation', xlab='time lag', ylab='ACF', ci.type=par6, ci=par7, sub=paste('(lambda=',par2,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='')) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/2sb4w1261923442.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.1258456958 0.2230649894 0.3364382623 0.2050803541 [6] 0.1089303139 0.1631725306 0.0308839502 0.1765345865 0.0617161507 [11] -0.0662825632 0.3205389400 -0.0595442755 -0.0480972327 0.1350308859 [16] 0.0354858032 -0.0177912944 0.0802319883 -0.1267954343 0.0414997766 [21] -0.0713285265 -0.2462041784 -0.0548427356 -0.0879569865 -0.2403163543 [26] -0.1327104280 -0.1431301371 -0.2159195067 -0.1407648573 -0.1364023702 [31] -0.1062952162 -0.0270494896 -0.1600883085 0.0018669864 -0.0002089735 [36] -0.0490164473 -0.0458741110 -0.0637423349 -0.0541709293 -0.0502105386 [41] -0.0529640342 -0.0819458374 -0.0111918183 -0.0300599818 -0.0147966154 [46] 0.0056128779 -0.0162325752 > (mypacf <- c(rpacf$acf)) [1] 0.1258456958 0.2105625587 0.3059758266 0.1344762807 -0.0315200848 [6] 0.0005497449 -0.1049380208 0.1197940932 0.0145281172 -0.1366085794 [11] 0.3011057492 -0.1410584923 -0.1036598710 0.0392997730 0.0177229681 [16] 0.0393652270 0.0036238083 -0.1465260486 -0.0244215605 -0.0901752448 [21] -0.1528894636 -0.1157806196 0.0783767669 -0.0259227773 -0.1289484449 [26] -0.0445281018 -0.0929187870 -0.0733623183 0.1509613193 -0.0074506449 [31] 0.0956273205 0.0159419034 0.0333016035 -0.0370559635 0.0992365458 [36] 0.0302756683 -0.1212225273 0.0449279850 -0.0414363272 -0.0648127745 [41] 0.0138668425 -0.0718918134 0.0677192550 0.0109682882 -0.0447415769 [46] -0.1433926172 > 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/3gw6d1261923442.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/4nh0j1261923443.tab") > > try(system("convert tmp/1czq21261923442.ps tmp/1czq21261923442.png",intern=TRUE)) character(0) > try(system("convert tmp/2sb4w1261923442.ps tmp/2sb4w1261923442.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.595 0.327 0.865