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(2350.44,2440.25,2408.64,2472.81,2407.6,2454.62,2448.05,2497.84,2645.64,2756.76,2849.27,2921.44,2981.85,3080.58,3106.22,3119.31,3061.26,3097.31,3161.69,3257.16,3277.01,3295.32,3363.99,3494.17,3667.03,3813.06,3917.96,3895.51,3801.06,3570.12,3701.61,3862.27,3970.1,4138.52,4199.75,4290.89,4443.91,4502.64,4356.98,4591.27,4696.96,4621.4,4562.84,4202.52,4296.49,4435.23,4105.18,4116.68,3844.49,3720.98,3674.4,3857.62,3801.06,3504.37,3032.6,3047.03,2962.34,2197.82,2014.45,1862.83,1905.41,1810.99,1670.07,1864.44,2052.02,2029.6,2070.83,2293.41,2443.27,2513.17) > par7 = '0.95' > par6 = 'White Noise' > 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: > 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/1luab1260724368.ps",horizontal=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/2pzco1260724368.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.0000000000 -0.3955212627 -0.1576040826 0.1299691121 -0.2220711414 [6] 0.3029590829 0.0875536985 -0.3437229333 0.1827764403 -0.0085272880 [11] -0.1067347326 0.4498230422 -0.4233812348 -0.1079842306 0.3091869763 [16] -0.1068018995 0.0897169454 -0.0862319356 -0.1845358643 0.2475224638 [21] -0.0532337312 -0.0133994761 0.0329408101 -0.0679071132 -0.0664284063 [26] 0.1654811877 -0.1030823216 -0.0245824371 0.0563116926 -0.0710822073 [31] 0.0786225223 -0.0573196087 0.0121795009 0.0033014185 0.0128539053 [36] -0.0670703867 0.0451829708 0.0158273866 -0.0342476170 0.0339976896 [41] -0.0398392151 0.0056692018 0.0329688778 -0.0380478902 -0.0008829042 [46] -0.0136883673 0.0094407187 0.0170211794 0.0059529773 -0.0314878380 [51] 0.0005917643 -0.0003922718 0.0054451907 0.0025712631 -0.0138641594 [56] 0.0038045377 > (mypacf <- c(rpacf$acf)) [1] -0.3955212627 -0.3722794594 -0.1414947463 -0.3811563563 0.0501770357 [6] 0.2530181060 -0.0513325450 0.0595384244 0.0802080201 -0.1057436274 [11] 0.4051652742 0.0421442991 -0.1857655470 -0.0005236153 0.1080840925 [16] -0.0759054384 -0.1350851942 0.0142997225 -0.0525646742 -0.2062495038 [21] 0.1367934035 -0.1178121443 0.1911081034 0.0032114148 -0.0947215373 [26] -0.1235089331 0.0063939631 0.0623924594 -0.0745063386 -0.0619251545 [31] -0.0201013907 -0.0383700563 0.0651205295 -0.0216767120 0.0393681732 [36] -0.0172696467 -0.0171548123 0.0037373309 0.0024907846 0.0555727644 [41] 0.0467553906 -0.0754266070 -0.0978300372 -0.0785754543 -0.0028187007 [46] -0.0411263594 -0.0133063228 -0.0435572861 -0.0155389492 0.0421248260 [51] -0.0290826447 0.0090155483 -0.0286211500 0.0170196968 -0.0397459777 > 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/3t3ba1260724368.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/4qjch1260724368.tab") > > try(system("convert tmp/1luab1260724368.ps tmp/1luab1260724368.png",intern=TRUE)) character(0) > try(system("convert tmp/2pzco1260724368.ps tmp/2pzco1260724368.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.600 0.313 0.686