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(6.4,6.8,7.5,7.5,7.6,7.6,7.4,7.3,7.1,6.9,6.8,7.5,7.6,7.8,8,8.1,8.2,8.3,8.2,8,7.9,7.6,7.6,8.2,8.3,8.4,8.4,8.4,8.6,8.9,8.8,8.3,7.5,7.2,7.5,8.8,9.3,9.3,8.7,8.2,8.3,8.5,8.6,8.6,8.2,8.1,8,8.6,8.7,8.8,8.5,8.4,8.5,8.7,8.7,8.6,8.5,8.3,8.1,8.2,8.1,8.1,7.9,7.9,7.9,8,8,7.9,8,7.7,7.2,7.5,7.3,7,7,7,7.2,7.3,7.1,6.8,6.6,6.2,6.2,6.8,6.9) > par5 = '12' > par4 = '1' > par3 = '2' > 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/1j3ql1229504455.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/2ygdf1229504455.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.014605592 -0.095954677 -0.340825323 -0.391611650 [6] 0.065092659 0.150074122 0.177339268 0.113780445 0.003453159 [11] -0.114652865 0.012199336 -0.182493646 0.021569733 0.054668934 [16] 0.104093880 0.073162542 -0.175717515 0.072785508 -0.154294875 [21] 0.143137370 0.068246558 -0.013102528 0.014042577 -0.189293448 [26] 0.015010016 0.072597836 0.112275352 0.028261328 -0.076592031 [31] -0.227949759 0.037719305 0.102245568 0.131719492 0.097378953 [36] -0.128741092 -0.054251322 -0.144003365 0.079050699 0.002839422 [41] 0.041796684 0.131891947 -0.055262382 0.022276461 -0.162308964 [46] -0.028878447 0.027004773 0.086417236 0.029676812 0.034662117 [51] -0.082483569 -0.009074180 -0.009946938 0.016958082 0.033635502 [56] -0.048193753 0.057242910 -0.051859945 -0.013646945 0.060866834 [61] -0.036663948 > (mypacf <- c(rpacf$acf)) [1] -0.014605592 -0.096188520 -0.347050837 -0.485838177 -0.172035249 [6] -0.158776087 -0.234276409 -0.194456835 -0.043487403 -0.105170395 [11] 0.077314344 -0.134374104 -0.021563768 0.018628234 0.107336886 [16] 0.012470222 -0.202855131 0.131451332 -0.131311278 0.031356429 [21] 0.015395533 0.032434149 0.089316201 -0.112938814 0.041168359 [26] 0.073900598 0.136899773 0.079917709 -0.094131967 -0.161345367 [31] -0.072521115 0.011953204 -0.078755331 -0.090911592 0.033241927 [36] -0.019360212 -0.048217287 0.070429058 0.007080247 -0.017687577 [41] 0.071284645 -0.035532809 -0.034756090 -0.096260882 0.036241536 [46] -0.064825430 -0.077834780 -0.079960553 -0.056047955 -0.025355420 [51] 0.063802648 -0.034387353 0.063655481 -0.065719689 0.021518836 [56] 0.003890513 -0.006958012 -0.035482348 -0.014532922 -0.048463851 > 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/3uo411229504455.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/4wile1229504455.tab") > > system("convert tmp/1j3ql1229504455.ps tmp/1j3ql1229504455.png") > system("convert tmp/2ygdf1229504455.ps tmp/2ygdf1229504455.png") > > > proc.time() user system elapsed 0.624 0.341 9.257