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(1145.11 + ,1176.86 + ,1206.41 + ,1192.72 + ,1214.82 + ,1199.07 + ,1157.47 + ,1100.1 + ,1095.63 + ,1105.63 + ,1137.79 + ,1124.72 + ,1152.6 + ,1211.85 + ,1239.62 + ,1244.13 + ,1198.42 + ,1227.99 + ,1304.92 + ,1340.26 + ,1307.32 + ,1356.51 + ,1383.29 + ,1437.87 + ,1494.56 + ,1521.42 + ,1498.76 + ,1488.75 + ,1524.62 + ,1439.27 + ,1423.11 + ,1466.85 + ,1425.83 + ,1363.45 + ,1389.18 + ,1395.89 + ,1368.43 + ,1349.03 + ,1299.88 + ,1365.41 + ,1451.04 + ,1433.75 + ,1464.65 + ,1475.57 + ,1471.16 + ,1429.12 + ,1452.46 + ,1538.09 + ,1631.59 + ,1665.5 + ,1690.6 + ,1711.74 + ,1734.1 + ,1748.09 + ,1703.45 + ,1745.74 + ,1751.01 + ,1795.65 + ,1852.13 + ,1877.1 + ,1989.31 + ,2097.76 + ,2154.87 + ,2152.18 + ,2250.27 + ,2346.9 + ,2525.56 + ,2409.36 + ,2394.36 + ,2401.33 + ,2354.32 + ,2450.41 + ,2504.67 + ,2661.39 + ,2880.4 + ,3064.42 + ,3141.12 + ,3327.7 + ,3564.95 + ,3403.13 + ,3149.9 + ,3006.84 + ,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 + ,1862.83 + ,1905.41 + ,1810.99 + ,1670.07 + ,1864.44 + ,2052.02 + ,2029.6 + ,2070.83 + ,2293.41 + ,2443.27 + ,2513.17 + ,2466.92 + ,2502.66) > par8 = '' > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '0' > par3 = '0' > 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/1najn1292774431.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/2najn1292774431.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.985744074 0.966428810 0.946154459 0.923259733 [6] 0.897823467 0.868979822 0.840092825 0.810564170 0.778571091 [11] 0.744859420 0.712399941 0.678142225 0.642977662 0.608933060 [16] 0.574918033 0.541800760 0.506816747 0.471593676 0.438015112 [21] 0.404743762 0.372814647 0.342597588 0.314705588 0.289033808 [26] 0.264976490 0.241567722 0.218967264 0.196733046 0.174075430 [31] 0.150582731 0.126617344 0.103681903 0.081100817 0.059289721 [36] 0.039250847 0.020724272 0.001768582 -0.017082521 -0.035260588 [41] -0.052288271 -0.067909403 -0.083117696 -0.096950330 -0.109528481 [46] -0.121439899 -0.133075471 -0.143765781 -0.152918199 > (mypacf <- c(rpacf$acf)) [1] 0.985744074 -0.185899909 -0.012627072 -0.099807395 -0.073512112 [6] -0.112182631 0.027381919 -0.035614676 -0.080002470 -0.048080769 [11] 0.053061547 -0.100530945 -0.012076684 0.035095844 -0.027921783 [16] 0.007186556 -0.084163345 -0.010982819 0.015274712 -0.016308906 [21] 0.036724461 0.019247902 0.037514014 0.028440250 0.009043755 [26] -0.023670645 -0.030448965 -0.030760126 -0.045949637 -0.080131050 [31] -0.034609873 0.007592352 -0.019544764 0.017849986 0.034111867 [36] 0.018968779 -0.059061789 -0.010537138 -0.014586465 -0.002981695 [41] 0.019112304 -0.003458640 0.013775570 0.004879679 0.005781873 [46] -0.011821404 0.009865619 0.018344367 > 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/3j2ze1292774431.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/4n2f21292774431.tab") > > try(system("convert tmp/1najn1292774431.ps tmp/1najn1292774431.png",intern=TRUE)) character(0) > try(system("convert tmp/2najn1292774431.ps tmp/2najn1292774431.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.601 0.341 1.285