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(-697.3,-143.8,-137.4,-26.9,559.2,630.2,1070.9,-820.8,993.3,741.7,603.6,-145.8,-35.1,395.1,523.1,462.3,183.4,791.5,344.8,-217,406.7,228.6,-580.1,-1550.4,-1447.5,-40.1,-1033.5,-925.6,-347.8,-447.7,-102.6,-2062.2,-929.7,-720.7,-1541.8,-1432.3,-1216.2,-212.8,-378.2,76.9,-101.3,220.4,495.6,-1035.2,61.8,-734.8,-6.9,-1061.1,-854.6,-186.5,244,-992.6,-335.2,316.8,477.6,-572.1) > par8 = '' > par7 = '' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '0' > 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: 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/18x7d1293553216.ps",horizontal=F,onefile=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/28x7d1293553216.ps",horizontal=F,onefile=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.415675097 0.342184227 0.320450700 0.416107126 [6] 0.227923838 -0.063290274 0.130975190 0.207786810 0.123899102 [11] 0.012150871 0.102312605 0.268120301 -0.014073045 -0.155828696 [16] -0.182435872 -0.093954102 -0.191720404 -0.431659782 -0.248901091 [21] -0.119040602 -0.152296242 -0.197175984 -0.192338260 0.075763652 [26] -0.114075996 -0.226374473 -0.171628153 -0.114342127 -0.088727240 [31] -0.240725399 -0.094721848 -0.010270339 0.017955803 -0.015580515 [36] -0.021468097 0.111113973 -0.031445471 -0.013502318 -0.073768701 [41] 0.026234135 -0.031388280 -0.075201926 -0.056341343 0.045632457 [46] 0.023658299 -0.014585629 -0.013051107 0.061070172 0.019521673 [51] 0.003290791 0.009887658 0.003473528 -0.007931090 -0.012867386 [56] 0.005523787 > (mypacf <- c(rpacf$acf)) [1] 0.415675097 0.204781830 0.154213757 0.263118188 -0.071014626 [6] -0.376031621 0.143425538 0.196646851 0.026667290 0.028064339 [11] 0.017430124 0.061365321 -0.263869160 -0.241989328 -0.192036122 [16] -0.053327769 0.103089867 -0.110683471 0.003700756 0.084358454 [21] -0.057009803 0.072061205 -0.102384286 0.117745557 0.011801774 [26] -0.094029449 0.054029780 -0.132593808 0.018890484 0.098034164 [31] -0.042931657 -0.084002324 -0.044670858 0.011012465 -0.026181691 [36] -0.082108741 -0.086358077 0.111448546 -0.008669336 0.079830778 [41] -0.178389907 -0.001758127 -0.091889033 0.028551937 0.032642697 [46] -0.080238303 0.081862512 0.053392772 -0.042414639 0.074467726 [51] -0.031566262 -0.076753776 -0.027392649 -0.007409262 -0.010451970 > 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/3tf6j1293553216.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/4fgmp1293553216.tab") > try(system("convert tmp/18x7d1293553216.ps tmp/18x7d1293553216.png",intern=TRUE)) character(0) > try(system("convert tmp/28x7d1293553216.ps tmp/28x7d1293553216.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.631 0.340 19.639