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(4000 + ,3600 + ,1600 + ,2500 + ,3800 + ,3500 + ,4100 + ,2000 + ,3300 + ,4000 + ,4100 + ,4200 + ,1100 + ,1900 + ,4800 + ,4000 + ,3250 + ,1200 + ,3600 + ,3400 + ,3600 + ,3300 + ,1300 + ,2500 + ,3800 + ,3800 + ,3000 + ,1600 + ,2100 + ,3900 + ,4000 + ,3900 + ,2300 + ,3600 + ,3600 + ,4200 + ,4400 + ,1900 + ,2700 + ,3600 + ,4100 + ,5250 + ,1200 + ,3000 + ,4000 + ,5200 + ,2100 + ,3400 + ,5200 + ,6900 + ,2300 + ,4100 + ,4300 + ,4500 + ,4700 + ,2200 + ,2900 + ,4400 + ,5100 + ,2300 + ,3500 + ,4100 + ,4700 + ,5400 + ,2500 + ,3500 + ,3900 + ,4100 + ,4500 + ,1800 + ,4900 + ,4500 + ,3700 + ,3100 + ,1700 + ,4000 + ,4200 + ,4300 + ,3600 + ,2600 + ,4600 + ,4000 + ,2900 + ,1800 + ,3000 + ,4200 + ,4400 + ,4900 + ,2300 + ,2400 + ,3600 + ,3900 + ,2800 + ,3800 + ,4400 + ,4200 + ,5400 + ,2300 + ,3500 + ,3800 + ,4400 + ,4400 + ,2500 + ,3700 + ,3500 + ,3300 + ,3700 + ,2200 + ,3200 + ,3100 + ,4800 + ,4400 + ,2500 + ,3100 + ,4700 + ,4300 + ,4600 + ,3100 + ,3200 + ,4300 + ,4000 + ,4500 + ,2600 + ,3600 + ,4700 + ,3800 + ,4100 + ,1700 + ,3200 + ,4000 + ,3700 + ,3600 + ,2500 + ,3800 + ,4500 + ,3500 + ,4100 + ,2300 + ,3400 + ,4800 + ,4900 + ,2600 + ,3300 + ,3900 + ,3800 + ,5000 + ,1700 + ,2700 + ,4000 + ,3300 + ,4000 + ,2500 + ,3600 + ,3800 + ,5900 + ,3600 + ,3300 + ,4000 + ,4200 + ,4300 + ,2900 + ,3900 + ,5200 + ,4000 + ,4700 + ,2200 + ,2400 + ,3700 + ,3700 + ,3000 + ,2100 + ,3500 + ,6300 + ,5200 + ,7800 + ,2700 + ,3400 + ,5000 + ,5500 + ,4500 + ,2600 + ,3900 + ,3800 + ,4400 + ,4300 + ,3300 + ,3600 + ,5300 + ,3700 + ,3800 + ,4000 + ,5200 + ,5100 + ,5100 + ,5200 + ,3800 + ,6700 + ,5200 + ,4900 + ,5700 + ,2700 + ,6300 + ,5200 + ,4500 + ,6400 + ,4000 + ,3500 + ,4700 + ,4700 + ,5000 + ,2300 + ,5200 + ,5100 + ,5400 + ,4400 + ,2600 + ,4700 + ,6100 + ,6100 + ,3500 + ,4900 + ,5500 + ,5300 + ,6300 + ,2800 + ,5900 + ,5500 + ,5200 + ,6400 + ,3100 + ,5100 + ,5400 + ,5400 + ,5100 + ,2400 + ,5500 + ,5300 + ,5000 + ,4500 + ,2000 + ,3800 + ,4900 + ,5000 + ,4000 + ,1900 + ,5200 + ,5400 + ,3200 + ,800 + ,3800 + ,4300 + ,2700) > 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/1qrpc1242309324.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/2wvo31242309324.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.1824586485 -0.0453439761 0.0173894023 0.2695551793 [6] 0.5710132117 0.0483834550 -0.0668909253 0.0258070965 0.3101358985 [11] 0.4576386529 -0.0169106747 -0.0633783389 0.0464017531 0.3076504033 [16] 0.3237016915 0.0085949147 0.0014785079 0.1117856514 0.3164603336 [21] 0.2450206211 -0.0190398996 0.0046394652 0.0943500401 0.3108517361 [26] 0.1404194258 -0.0666765151 -0.0146222871 0.0488636380 0.2523611078 [31] 0.1168964535 -0.0684147285 -0.0310461387 0.1255747751 0.1874208475 [36] 0.0476702169 -0.0918792266 -0.0005571399 0.1316788195 0.1762277443 [41] 0.0433271032 -0.0767038470 0.0165953271 0.0794662654 0.1292393293 [46] -0.0235485732 -0.0709720993 -0.0092933840 0.0859399740 > (mypacf <- c(rpacf$acf)) [1] 0.1824586485 -0.0813431419 0.0428793240 0.2651595770 0.5299339314 [6] -0.0825087062 -0.0240089418 -0.0560434431 0.1140029503 0.2149944199 [11] -0.0290700242 -0.0056110253 -0.0577381064 0.0282529807 0.0502144144 [16] 0.1182325391 0.0787583414 0.0361196339 0.0276623957 0.0074486927 [21] -0.0155035560 -0.0003003516 -0.0475294285 0.0743040015 -0.0565631153 [26] -0.0735542033 -0.0589094784 -0.1171421459 0.0196478445 0.0921575371 [31] 0.0143287897 -0.0407665132 0.0547223596 -0.1208739175 -0.0095896238 [36] -0.0342306071 0.0482228439 0.0188593447 0.0287884302 0.0062968958 [41] -0.0096611404 0.0015689801 -0.0856792679 0.0626684840 -0.0317434719 [46] 0.0343984091 -0.0730617874 0.0039742606 > 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/3gznq1242309324.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/43o2l1242309324.tab") > > system("convert tmp/1qrpc1242309324.ps tmp/1qrpc1242309324.png") > system("convert tmp/2wvo31242309324.ps tmp/2wvo31242309324.png") > > > proc.time() user system elapsed 0.582 0.300 0.704