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(299.63,305.945,382.252,348.846,335.367,373.617,312.612,312.232,337.161,331.476,350.103,345.127,297.256,295.979,361.007,321.803,354.937,349.432,290.979,349.576,327.625,349.377,336.777,339.134,323.321,318.86,373.583,333.03,408.556,414.646,291.514,348.857,349.368,375.765,364.136,349.53,348.167,332.856,360.551,346.969,392.815,372.02,371.027,342.672,367.343,390.786,343.785,362.6,349.468,340.624,369.536,407.782,392.239,404.824,373.669,344.902,396.7,398.911,366.009,392.484) > 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/1p6jf1228771137.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/2jcrz1228771137.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.262172745 0.139385027 0.252715597 0.034427609 [6] 0.321784688 0.402763883 0.273528369 0.060744993 0.147483903 [11] -0.030194900 0.151290355 0.479581309 0.102246829 0.076572694 [16] -0.007718079 -0.052931188 0.118918257 0.169844604 0.104395068 [21] -0.142179477 -0.098139193 -0.114550102 0.065790149 0.201896665 [26] 0.028430109 -0.058916664 -0.156951706 -0.146877383 -0.127511721 [31] 0.059105834 0.009921406 -0.202069194 -0.203444533 -0.172449943 [36] -0.131450073 -0.078059698 -0.048100978 -0.183297700 -0.205593803 [41] -0.139773278 -0.212042283 -0.054082719 -0.060876100 -0.247401929 [46] -0.162222165 -0.116047765 -0.126286214 -0.018507694 -0.029286089 [51] -0.136527438 -0.092735466 -0.103138289 -0.110982187 0.018342988 [56] -0.017741544 -0.075376787 -0.033646371 -0.046350687 -0.037881738 > (mypacf <- c(rpacf$acf)) [1] 0.262172745 0.075865027 0.214984381 -0.093257370 0.340736990 [6] 0.249654748 0.181050086 -0.227767931 0.117188684 -0.277117042 [11] 0.188131384 0.218469008 -0.019709701 -0.127906206 -0.117372307 [16] 0.023836642 -0.038428624 -0.048015923 -0.035781876 -0.208623839 [21] -0.064079631 0.078373185 0.173481641 0.010859155 0.046413759 [26] -0.075034840 0.028334592 -0.161771904 -0.185225823 -0.051526584 [31] 0.010752629 0.023332342 -0.034236366 0.138656997 -0.163148142 [36] -0.149067043 -0.050009635 0.042520009 -0.057142667 0.080397297 [41] -0.026385209 0.044212092 0.012674457 0.010931025 0.072887455 [46] -0.026771422 -0.003625062 0.033742716 -0.085592246 0.034034284 [51] 0.011390784 0.033178378 -0.022717364 0.018752397 -0.028960088 [56] 0.040752118 -0.084815614 0.029994876 0.017402592 > 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/36y8f1228771138.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/4fm0g1228771138.tab") > > system("convert tmp/1p6jf1228771137.ps tmp/1p6jf1228771137.png") > system("convert tmp/2jcrz1228771137.ps tmp/2jcrz1228771137.png") > > > proc.time() user system elapsed 0.584 0.327 0.704