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(63 + ,59 + ,10 + ,21 + ,12 + ,63 + ,61 + ,59 + ,70 + ,26 + ,74 + ,82 + ,40 + ,39 + ,28 + ,92 + ,2 + ,54 + ,25 + ,40 + ,96 + ,4 + ,29 + ,22 + ,14 + ,47 + ,15 + ,80 + ,92 + ,22 + ,57 + ,42 + ,53 + ,72 + ,15 + ,65 + ,29 + ,7 + ,84 + ,1 + ,36 + ,56 + ,86 + ,65 + ,75 + ,85 + ,12 + ,11 + ,68 + ,79 + ,90 + ,71 + ,68 + ,23 + ,6 + ,97 + ,6 + ,65 + ,18 + ,78 + ,14 + ,98 + ,79 + ,30 + ,74 + ,1 + ,36 + ,25 + ,41 + ,93 + ,39 + ,77 + ,51 + ,67 + ,51 + ,85 + ,71 + ,71 + ,74 + ,45 + ,47 + ,83 + ,82 + ,23 + ,73 + ,67 + ,14 + ,84 + ,40 + ,67 + ,52 + ,23 + ,4 + ,56 + ,81 + ,75 + ,37 + ,30 + ,56 + ,51 + ,67 + ,50 + ,67 + ,59 + ,17 + ,53 + ,44 + ,6 + ,49 + ,84 + ,52 + ,37 + ,4 + ,53 + ,52 + ,43 + ,94 + ,50 + ,39 + ,61 + ,96 + ,2 + ,38 + ,11 + ,82 + ,40 + ,46 + ,99 + ,81 + ,39 + ,88 + ,66 + ,24 + ,27 + ,23 + ,54 + ,85 + ,66 + ,48 + ,18 + ,57 + ,78 + ,90 + ,15 + ,72 + ,5 + ,25 + ,97 + ,37 + ,39 + ,22 + ,88 + ,39 + ,30 + ,79 + ,7 + ,91 + ,36 + ,14 + ,91 + ,34 + ,10 + ,71 + ,28 + ,40 + ,92 + ,47 + ,34 + ,60 + ,79 + ,23 + ,26 + ,29 + ,3 + ,97 + ,52 + ,48 + ,15 + ,62 + ,96 + ,12 + ,31 + ,72 + ,45 + ,75 + ,54 + ,45 + ,64 + ,9 + ,41 + ,85 + ,11 + ,59 + ,11 + ,21 + ,95 + ,45 + ,88 + ,47 + ,18 + ,100 + ,46 + ,27 + ,2 + ,79 + ,69 + ,33 + ,31 + ,34 + ,31 + ,63 + ,94 + ,26 + ,92 + ,80 + ,70 + ,88 + ,57 + ,54 + ,70 + ,80 + ,17 + ,53 + ,86 + ,95 + ,58 + ,8 + ,28 + ,48 + ,2 + ,69 + ,2 + ,52 + ,57 + ,60 + ,22 + ,90 + ,35 + ,87 + ,42 + ,29 + ,6 + ,3 + ,88 + ,17 + ,1 + ,62 + ,3 + ,26 + ,12 + ,74 + ,39 + ,2 + ,8 + ,66 + ,43 + ,86 + ,33 + ,63 + ,36 + ,69 + ,73 + ,8 + ,74 + ,64 + ,6 + ,98 + ,93 + ,60 + ,93 + ,55 + ,4 + ,42 + ,79 + ,2 + ,36 + ,8 + ,79 + ,2 + ,80 + ,79 + ,37 + ,28 + ,54 + ,21 + ,72 + ,84 + ,11 + ,34 + ,70 + ,12 + ,9 + ,76 + ,60 + ,7 + ,43 + ,70 + ,54 + ,13 + ,55 + ,95 + ,49 + ,69 + ,30 + ,11 + ,66 + ,19 + ,47 + ,44 + ,32 + ,51 + ,57 + ,2 + ,39 + ,83 + ,70 + ,10 + ,82 + ,67 + ,24 + ,0 + ,9 + ,58 + ,62 + ,77 + ,56 + ,36 + ,16 + ,38 + ,41 + ,18 + ,46 + ,4 + ,12 + ,16 + ,82 + ,48 + ,58 + ,79 + ,94 + ,62 + ,62 + ,99 + ,14 + ,85 + ,87 + ,61 + ,27 + ,96 + ,10 + ,24 + ,40 + ,16 + ,59 + ,18 + ,79 + ,91 + ,38 + ,75 + ,4 + ,85 + ,4 + ,19 + ,40 + ,1 + ,10 + ,61 + ,33 + ,53 + ,46 + ,86 + ,83 + ,56 + ,72 + ,66 + ,60 + ,36 + ,7 + ,87 + ,42 + ,98 + ,53 + ,85 + ,18 + ,70 + ,22 + ,12 + ,35 + ,94 + ,5 + ,56 + ,42 + ,0 + ,58 + ,18 + ,66 + ,67 + ,68 + ,76 + ,59) > 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/1e7ud1229893710.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/2ncfk1229893710.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.000000e+00 -9.551592e-02 -9.510495e-03 7.959801e-02 -6.661929e-02 [6] 1.154444e-02 -3.014630e-02 2.124471e-02 -5.073829e-02 -6.977630e-02 [11] 8.074873e-02 -4.601548e-02 -4.193331e-02 5.262280e-02 4.451225e-03 [16] -5.124773e-02 1.175870e-02 -4.610811e-02 5.379684e-02 -7.838001e-02 [21] 3.330858e-02 -3.620373e-02 2.144240e-02 1.356216e-02 -7.798439e-02 [26] 6.431811e-03 -2.631909e-02 2.541659e-02 -1.471106e-05 -6.532570e-02 [31] 2.479125e-02 1.381360e-03 6.037453e-02 3.664485e-02 -1.982142e-02 [36] -1.594190e-02 -1.062913e-02 -3.865458e-02 3.392247e-02 1.307536e-02 [41] -3.284685e-02 -1.139668e-02 5.287783e-02 5.194220e-02 -3.259256e-02 [46] 2.783418e-02 6.198946e-02 -9.247795e-02 -6.999744e-02 1.029968e-01 [51] -4.867717e-02 1.151981e-02 -1.016247e-01 1.012596e-02 5.343658e-02 [56] -2.514462e-02 1.051643e-01 -1.707882e-02 -9.235992e-04 7.645590e-02 [61] 1.323017e-02 > (mypacf <- c(rpacf$acf)) [1] -0.095515921 -0.018805353 0.077611585 -0.052494011 0.002087090 [6] -0.036629483 0.024829076 -0.052691817 -0.074549049 0.060806743 [11] -0.024461379 -0.045191631 0.027890855 0.022581414 -0.050872289 [16] -0.004445790 -0.056208204 0.057559057 -0.070990539 0.015661047 [21] -0.048750929 0.048617142 -0.012274564 -0.073105102 -0.016325981 [26] -0.026176208 0.029898408 -0.018315647 -0.055925199 -0.001269528 [31] 0.013468267 0.053438627 0.037165011 -0.015045545 -0.027690195 [36] -0.028673007 -0.031389874 0.019094993 0.034281835 -0.040095155 [41] -0.025324607 0.063068757 0.058515483 -0.022439176 -0.004695183 [46] 0.064744117 -0.058564768 -0.106817297 0.085552981 -0.011905360 [51] 0.035809712 -0.152226945 0.001898129 0.076171160 0.001926898 [56] 0.057081626 0.016169708 0.034584641 0.035233665 0.026807057 > 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/3lbn71229893710.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/4hdww1229893710.tab") > > system("convert tmp/1e7ud1229893710.ps tmp/1e7ud1229893710.png") > system("convert tmp/2ncfk1229893710.ps tmp/2ncfk1229893710.png") > > > proc.time() user system elapsed 0.621 0.322 0.740