R version 2.7.0 (2008-04-22) 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(92.66,94.2,94.37,94.45,94.62,94.37,93.43,94.79,94.88,94.79,94.62,94.71,93.77,95.73,95.99,95.82,95.47,95.82,94.71,96.33,96.5,96.16,96.33,96.33,95.05,96.84,96.92,97.44,97.78,97.69,96.67,98.29,98.2,98.71,98.54,98.2,96.92,99.06,99.65,99.82,99.99,100.33,99.31,101.1,101.1,100.93,100.85,100.93,99.6,101.88,101.81,102.38,102.74,102.82,101.72,103.47,102.98,102.68,102.9,103.03,101.29) > par5 = '6' > par4 = '1' > par3 = '1' > par2 = '-1.2' > 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/13fzs1228568051.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/267211228568051.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.000000000 0.172909800 0.080451715 0.027237808 -0.195873658 [6] -0.062487391 -0.482285805 -0.311542349 -0.125761718 -0.023047105 [11] 0.184897222 0.284777207 0.129346934 0.262322839 0.220878433 [16] -0.026008277 0.056562655 -0.234417466 -0.252763910 -0.168816327 [21] -0.152088144 0.021753612 -0.046874587 -0.029454581 0.288677848 [26] 0.142641666 0.065840754 0.111703724 -0.077893157 0.059949558 [31] -0.180090760 -0.126650534 -0.063024543 -0.186816984 0.012065503 [36] -0.070789144 0.083990145 0.109833018 0.095459876 0.054671841 [41] 0.033276873 0.045799205 -0.078496842 -0.074949264 -0.121794629 [46] -0.016965706 -0.024792873 -0.013969828 0.039409871 -0.014127396 [51] 0.045313354 0.014081007 0.003031622 0.014898888 > (mypacf <- c(rpacf$acf)) [1] 0.1729097997 0.0521119490 0.0052106900 -0.2122663631 0.0017064508 [6] -0.4806975460 -0.1983505170 -0.1159184655 0.0369361050 0.0354427768 [11] 0.2879108214 -0.2108103520 0.1104077750 0.0643263391 -0.0123643989 [16] 0.1767595874 0.1070533562 -0.2080985676 -0.0006269728 0.0901549560 [21] -0.0534706602 0.0006022407 -0.1194497797 0.0476919312 -0.1262412448 [26] -0.0103170006 -0.0105562445 0.0342840706 0.0121151101 -0.1436312476 [31] 0.0719000016 -0.0348463003 -0.0467198045 -0.0042507900 -0.1406015431 [36] 0.0274579242 0.0179803019 -0.0129423536 -0.0462703357 -0.0370660689 [41] -0.0836568709 -0.0439768805 0.0182403773 0.0463962537 -0.0252938036 [46] 0.1002177600 -0.0113139697 -0.0732796316 -0.0303940254 -0.0251561130 [51] -0.0563128725 -0.0177072266 -0.0078760931 > 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/35w0m1228568051.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/46ful1228568051.tab") > > system("convert tmp/13fzs1228568051.ps tmp/13fzs1228568051.png") > system("convert tmp/267211228568051.ps tmp/267211228568051.png") > > > proc.time() user system elapsed 1.529 0.558 1.641