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(3230.66,3361.13,3484.74,3411.13,3288.18,3280.37,3173.95,3165.26,3092.71,3053.05,3181.96,2999.93,3249.57,3210.52,3030.29,2803.47,2767.63,2882.6,2863.36,2897.06,3012.61,3142.95,3032.93,3045.78,3110.52,3013.24,2987.1,2995.55,2833.18,2848.96,2794.83,2845.26,2915.02,2892.63,2604.42,2641.65,2659.81,2638.53,2720.25,2745.88,2735.7,2811.7,2799.43,2555.28,2304.98,2214.95,2065.81,1940.49,2042,1995.37,1946.81,1765.9,1635.25,1833.42,1910.43,1959.67,1969.6,2061.41,2093.48,2120.88,2174.56,2196.72,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) > par5 = '12' > par4 = '0' > par3 = '1' > 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/freestat/rcomp/tmp/1velx1228935380.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/freestat/rcomp/tmp/2vijh1228935380.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.243162872 0.037049123 0.172144470 0.121989928 [6] 0.150555631 0.045192991 0.055647703 0.138035772 0.115772983 [11] 0.030417452 0.187003642 0.048511950 -0.076753573 0.115157863 [16] 0.062150651 0.022594596 -0.017241623 -0.088720832 0.041236780 [21] -0.032995567 -0.053783002 -0.068239483 -0.093415517 -0.097248140 [26] -0.012682309 -0.059493896 -0.067953644 0.008843138 -0.008421084 [31] -0.015090825 -0.059842915 -0.049324874 -0.084255251 -0.101879272 [36] -0.110807618 -0.007812587 -0.043570684 -0.047172393 -0.014265837 [41] -0.033434528 -0.035642033 -0.094895902 -0.107793224 -0.051907483 [46] -0.083741936 -0.089864012 -0.083196387 -0.075945592 -0.133795668 [51] -0.099270858 -0.087461916 -0.090706721 -0.010666336 -0.066265476 [56] -0.072225615 -0.053842542 -0.075694854 -0.060463367 -0.039850323 [61] 0.008888431 > (mypacf <- c(rpacf$acf)) [1] 0.243162872 -0.023466596 0.179326454 0.041029393 0.127215408 [6] -0.047250743 0.045118051 0.075804088 0.059985964 -0.032414225 [11] 0.181599907 -0.094745309 -0.090135467 0.099695058 -0.009497948 [16] -0.012050154 -0.045968756 -0.091900879 0.026915800 -0.084816989 [21] 0.033002432 -0.108582399 -0.055512997 -0.043271621 0.030811239 [26] -0.055031462 0.044222040 0.033885848 0.058981801 -0.033401830 [31] -0.004805881 0.016152388 -0.083355890 -0.027334197 -0.068450694 [36] 0.047453705 -0.028475107 0.037907452 -0.015389865 -0.023285469 [41] -0.015995016 -0.062417589 -0.077110366 -0.014118223 -0.048173767 [46] -0.029073052 -0.061297134 -0.017108349 -0.095220335 -0.014349137 [51] -0.041329300 -0.002711682 0.044441804 0.011910261 -0.062312037 [56] 0.007405760 -0.058951788 0.001396819 -0.003958462 0.087767583 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/www/html/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/3y3tb1228935381.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/freestat/rcomp/tmp/4l8up1228935381.tab") > > system("convert tmp/1velx1228935380.ps tmp/1velx1228935380.png") > system("convert tmp/2vijh1228935380.ps tmp/2vijh1228935380.png") > > > proc.time() user system elapsed 0.813 0.421 1.072