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(76.14,75.93,74.49,74.73,75.56,84.19,79.30,74.70,77.09,74.88,77.56,74.08,68.38,71.63,64.65,69.13,58.10,50.28,46.95,41.76,43.91,41.53,54.04,72.69,99.29,114.57,132.55,131.52,122.77,109.05,101.84,93.75,90.82,89.43,91.27,82.15,76.91,70.13,73.67,68.19,65.10,65.10,60.60,57.58,53.40,61.00,58.13,57.95,61.97,71.81,72.51,68.29,68.61,68.00,60.93,59.71,62.36,56.47) > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '1' > par3 = '1' > par2 = '1' > par1 = '48' > #'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: > 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 (par6 == 'White Noise') par6 <- 'white' else par6 <- 'ma' > par7 <- as.numeric(par7) > 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/13rjo1292234715.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > racf <- acf(x, par1, main='Autocorrelation', xlab='time lag', ylab='ACF', ci.type=par6, ci=par7, sub=paste('(lambda=',par2,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='')) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/23rjo1292234715.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.590488095 0.461694387 0.169735078 0.048773227 [6] -0.119686777 -0.141588228 -0.114438054 -0.138301009 -0.253712921 [11] -0.348417465 -0.367961612 -0.512593755 -0.393907556 -0.271280414 [16] -0.041993167 -0.016878139 0.084277462 0.129132486 0.199807774 [21] 0.101707984 0.174173899 0.120784542 0.131422526 0.034148996 [26] 0.098351154 0.052054975 0.017593986 0.002788919 -0.006353756 [31] 0.025856856 -0.085901833 -0.034058963 -0.067164695 -0.024722031 [36] -0.041549674 0.006734248 0.007724044 0.000667728 -0.022251968 [41] 0.024473513 0.025702219 -0.013290679 0.014851609 -0.006893013 > (mypacf <- c(rpacf$acf)) [1] 0.5904880949 0.1735207518 -0.2501861546 -0.0509714176 -0.1094046327 [6] -0.0001792267 0.0878811392 -0.1202807444 -0.2854721509 -0.1981624932 [11] -0.0258983027 -0.3271242121 0.0236132349 0.0867280739 0.0305380759 [16] -0.1782504687 -0.0706236151 0.0324645457 0.1154023511 -0.1685346365 [21] -0.0545587609 -0.1982315182 -0.0612330205 -0.1817893394 0.0871899534 [26] -0.0575570402 -0.0182832857 -0.0256270079 -0.0914161198 0.0632488423 [31] -0.0380627528 -0.0475938694 -0.0742001862 -0.1225386430 0.0183415992 [36] -0.1564857495 0.0230930609 -0.0670220179 0.0062197652 0.0009282365 [41] 0.0050177566 -0.0701348976 0.0147258385 -0.1176395349 > 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/37sic1292234715.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/4aay01292234715.tab") > > try(system("convert tmp/13rjo1292234715.ps tmp/13rjo1292234715.png",intern=TRUE)) character(0) > try(system("convert tmp/23rjo1292234715.ps tmp/23rjo1292234715.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.571 0.319 1.497