R version 2.6.0 (2007-10-03) Copyright (C) 2007 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(48527,44446,46380,48950,38883,42928,37107,30186,32602,39892,32194,21629,59968,45694,55756,48554,41052,49822,39191,31994,35735,38930,33658,23849,58972,59249,63955,53785,52760,44795,37348,32370,32717,40974,33591,21124,58608,46865,51378,46235,47206,45382,41227,33795,31295,42625,33625,21538,56421,53152,53536,52408,41454,38271,35306,26414,31917,38030,27534,18387,50556,43901,48572,43899,37532,40357,35489,29027,34485,42598,30306,26451,47460,50104,61465,53726,39477,43895,31481,29896,33842,39120,33702,25094,51442,45594,52518,48564,41745,49585,32747,33379,35645,37034,35681,20972) > 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/18eed1196433306.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/2101q1196433306.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.358892553 0.155750262 0.049037321 -0.183933938 [6] -0.315277328 -0.469838692 -0.344286878 -0.204160302 -0.022390012 [11] 0.054845413 0.254730603 0.786473878 0.294148602 0.124382990 [16] 0.025368340 -0.163729062 -0.295181405 -0.417120899 -0.310596349 [21] -0.185417017 -0.045211191 0.032517522 0.224948382 0.669372633 [26] 0.266935095 0.111063358 0.009200125 -0.133983080 -0.241133144 [31] -0.355240605 -0.248544312 -0.140278824 -0.018576855 0.020762746 [36] 0.148018184 0.520109308 0.210149391 0.074053014 0.004082356 [41] -0.126744672 -0.195319303 -0.290426273 -0.201951709 -0.118171194 [46] -0.027641234 0.025164368 0.120846208 0.434714146 0.185525051 [51] 0.068214345 0.013675688 -0.111357300 -0.149337815 -0.237370040 [56] -0.164428590 -0.086784763 -0.019714945 0.006786012 0.074698696 [61] 0.306854842 > (mypacf <- c(rpacf$acf)) [1] 0.358892553 0.030930345 -0.018649727 -0.230043227 -0.219974746 [6] -0.340349969 -0.107140176 -0.069413704 0.044993581 -0.100053860 [11] 0.087356736 0.708099830 -0.305155825 -0.180562288 -0.110054061 [16] 0.079798897 -0.061089752 0.085996164 0.008192780 -0.047775922 [21] -0.067981651 0.088254242 0.047779041 0.038381745 -0.075212180 [26] -0.050166945 -0.065180020 0.071629813 0.115232701 -0.003269692 [31] 0.002649156 -0.008954408 0.083891179 -0.063984488 -0.157493542 [36] -0.082534527 0.058197719 0.030604001 0.111204377 -0.084642500 [41] -0.027202012 -0.042184262 0.031654984 -0.061842985 -0.079022765 [46] 0.047474947 0.063635333 0.046129446 -0.008287348 0.025797575 [51] -0.050929430 -0.040246146 0.032889307 0.021294823 -0.063700514 [56] 0.007147680 0.017134393 -0.025277814 -0.009310094 -0.100315099 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > 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 1:par1) { + 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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/31oh81196433306.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-1,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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/40dtu1196433306.tab") > > system("convert tmp/18eed1196433306.ps tmp/18eed1196433306.png") > system("convert tmp/2101q1196433306.ps tmp/2101q1196433306.png") > > > proc.time() user system elapsed 0.963 0.348 1.150