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(267.850 + ,255.468 + ,246.717 + ,238.276 + ,229.336 + ,231.047 + ,264.440 + ,261.308 + ,257.844 + ,253.687 + ,248.286 + ,248.641 + ,243.753 + ,233.495 + ,222.356 + ,211.333 + ,202.478 + ,202.746 + ,238.802 + ,235.385 + ,224.820 + ,219.386 + ,213.106 + ,213.166 + ,208.201 + ,197.775 + ,189.191 + ,178.543 + ,171.809 + ,172.365 + ,204.140 + ,205.467 + ,193.079 + ,190.224 + ,185.553 + ,185.184 + ,183.059 + ,175.496 + ,168.120 + ,160.374 + ,155.290 + ,156.152 + ,189.784 + ,192.250 + ,184.896 + ,184.835 + ,180.172 + ,181.875 + ,182.412 + ,180.627 + ,174.303 + ,169.431 + ,163.902 + ,166.114 + ,198.414 + ,205.626 + ,199.333 + ,199.588 + ,196.569 + ,200.880 + ,201.579 + ,195.483 + ,190.617 + ,187.576 + ,183.968 + ,186.998 + ,216.617 + ,224.692 + ,222.476 + ,223.247 + ,225.618 + ,232.758 + ,235.868 + ,232.863 + ,227.564 + ,226.822 + ,223.864 + ,227.155 + ,260.300 + ,273.944 + ,270.779 + ,268.104 + ,268.703 + ,273.413 + ,275.597 + ,270.111 + ,262.272 + ,255.823 + ,250.753 + ,250.512 + ,277.888 + ,289.694 + ,281.310 + ,275.425 + ,271.287 + ,274.059 + ,274.113 + ,267.546 + ,257.622 + ,250.612 + ,243.829 + ,243.180 + ,275.362 + ,287.027 + ,279.175 + ,282.416 + ,275.424 + ,277.862 + ,284.998 + ,272.182 + ,258.613 + ,253.046 + ,243.315 + ,234.312 + ,265.912 + ,279.384 + ,262.547 + ,256.102 + ,251.133 + ,249.598 + ,251.592 + ,244.976 + ,237.527 + ,232.790 + ,224.726 + ,223.918 + ,252.637 + ,263.736 + ,251.143 + ,239.530 + ,232.401 + ,233.749 + ,232.055 + ,224.473 + ,215.866 + ,207.808 + ,199.440 + ,193.330 + ,222.787 + ,241.434 + ,221.263 + ,207.448 + ,200.241 + ,205.009 + ,206.230 + ,198.253 + ,194.660 + ,185.847 + ,180.314 + ,176.282 + ,203.541 + ,222.042 + ,197.519 + ,185.142 + ,176.355 + ,180.448 + ,180.143 + ,173.666 + ,165.687 + ,162.719 + ,157.079 + ,153.730 + ,182.698 + ,200.765 + ,176.512 + ,166.618 + ,158.644 + ,159.585 + ,163.095 + ,159.044 + ,155.511 + ,153.745 + ,150.569 + ,150.605 + ,179.612 + ,194.690 + ,189.917 + ,184.128 + ,175.335 + ,179.566 + ,181.140 + ,177.876 + ,175.041 + ,169.292 + ,166.070 + ,166.972 + ,206.348 + ,215.706 + ,202.108 + ,195.411 + ,193.111 + ,195.198 + ,198.770 + ,194.163 + ,190.420 + ,189.733 + ,186.029 + ,191.531 + ,232.571 + ,243.477 + ,227.247 + ,217.859 + ,208.679 + ,213.188 + ,216.234 + ,213.587 + ,209.465 + ,204.045 + ,200.237 + ,203.666 + ,241.476 + ,260.307 + ,243.324 + ,244.460 + ,233.575 + ,237.217 + ,235.243 + ,230.354 + ,227.184 + ,221.678 + ,217.142 + ,219.452 + ,256.446 + ,265.845 + ,248.624 + ,241.114 + ,229.245 + ,231.805 + ,219.277 + ,219.313 + ,212.610 + ,214.771 + ,211.142 + ,211.457 + ,240.048 + ,240.636 + ,230.580 + ,208.795 + ,197.922 + ,194.596 + ,194.581 + ,185.686 + ,178.106 + ,172.608 + ,167.302 + ,168.053 + ,202.300 + ,202.388 + ,182.516 + ,173.476 + ,166.444 + ,171.297) > par5 = '12' > par4 = '1' > par3 = '1' > par2 = '0.9' > 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/12k9r1228474367.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/2f4pc1228474367.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 -3.984591e-02 1.165092e-01 9.290301e-02 1.148114e-01 [6] 5.773017e-02 5.048763e-02 1.148223e-01 -8.721921e-02 8.579550e-02 [11] 2.331590e-02 3.271058e-02 -2.656497e-01 1.012358e-01 5.804262e-02 [16] -9.655470e-02 5.821033e-02 -2.695466e-02 9.563686e-02 -9.023785e-03 [21] 1.591863e-01 4.948685e-02 -3.254711e-02 8.476206e-02 -8.423122e-02 [26] 2.981968e-02 -6.369497e-02 1.182484e-01 -4.241959e-02 5.386776e-03 [31] -9.841874e-02 -1.482353e-02 -6.002881e-03 -2.896761e-02 1.403354e-02 [36] 1.360393e-02 -2.808605e-02 6.860597e-02 -2.267510e-02 -8.627883e-02 [41] -3.338847e-02 6.723743e-03 -7.936412e-02 -1.015331e-03 -1.160671e-01 [46] -3.085897e-02 5.386801e-03 -7.576206e-02 -2.005835e-02 -1.526892e-01 [51] -6.678690e-03 -1.013666e-02 -3.640677e-02 -8.812866e-02 8.080785e-02 [56] -1.376854e-05 -6.175900e-02 -1.119349e-01 -1.104931e-01 -1.012795e-01 [61] -5.341481e-03 > (mypacf <- c(rpacf$acf)) [1] -0.0398459109 0.1151042854 0.1031253747 0.1123052015 0.0483384604 [6] 0.0224984510 0.0890875143 -0.1102299188 0.0371038274 0.0208554088 [11] 0.0155050549 -0.2856148315 0.0619917862 0.1190971869 -0.0587389418 [16] 0.0516238328 0.0053733582 0.1113909595 0.0416710317 0.0793814747 [21] 0.0925636239 -0.0545558342 -0.0009784811 -0.2188042219 0.0128415180 [26] -0.0160375868 0.0401387147 0.0290670186 -0.0022397438 -0.0823527343 [31] -0.0001558455 0.0553662443 0.0585120104 -0.0423549535 0.1020238387 [36] -0.1487797483 0.1060649932 -0.0731402043 -0.1087689660 -0.0532456490 [41] -0.0478771634 -0.0999813266 0.0441797425 -0.0508579193 0.0318243157 [46] 0.0393217674 0.0124507800 -0.0888761022 -0.0227211355 -0.0198856847 [51] 0.0302560001 -0.0279458745 -0.0898301253 0.0493529424 0.0388507449 [56] -0.1269375501 -0.1423524153 -0.0980407659 -0.0589348519 0.0197440122 > 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/3g3ma1228474367.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/4qzht1228474367.tab") > > system("convert tmp/12k9r1228474367.ps tmp/12k9r1228474367.png") > system("convert tmp/2f4pc1228474367.ps tmp/2f4pc1228474367.png") > > > proc.time() user system elapsed 0.608 0.325 0.714