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(356,355,354,352,372,371,356,346,347,347,348,350,353,351,348,351,370,370,351,335,330,328,332,334,343,334,336,343,365,364,351,326,320,312,315,316,319,311,315,322,336,339,317,295,291,283,285,289,296,283,285,289,306,306,283,258,255,248,244,249,258,252,246,249,267,284,261,235,229,218,218,229,237,231,229,233,245,256,224,194,192,178,170,187,192,182,178,186,204,224,194,173,178,168,152,163,172,170,156,155,178,194,164,135,139,135,109,121,131,135,119,121,151,169,135,105,112,105,82,81) > par7 = '0.95' > par6 = 'White Noise' > par5 = '12' > par4 = '2' > 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: > 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/1zyst1282207480.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/2zyst1282207480.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.8705570490 0.7329165666 0.5626642806 0.4079953857 [6] 0.2196368507 0.0136257770 -0.1689408138 -0.3137976185 -0.4194319765 [11] -0.5535767371 -0.6208850886 -0.6677826236 -0.5624508947 -0.4667718205 [16] -0.3331897051 -0.1823806514 -0.0226418930 0.1103055550 0.1960306723 [21] 0.2717131109 0.3306684393 0.3958382379 0.3731191161 0.3553930041 [26] 0.2960173366 0.2611578394 0.1725259802 0.0560768015 -0.0576070719 [31] -0.1321813772 -0.1713465108 -0.2126422823 -0.2311668893 -0.2385661498 [36] -0.1810707760 -0.1475609994 -0.1007693247 -0.0881785378 -0.0355971150 [41] 0.0242818852 0.0808021989 0.1325021148 0.1577954737 0.1695043145 [46] 0.1438222401 0.1056378763 0.0379320341 -0.0009383854 -0.0615658191 [51] -0.0954133621 -0.1369287417 -0.1606712373 -0.1699182803 -0.1939998509 [56] -0.1947950564 -0.1733979845 -0.1219519356 -0.0748097663 -0.0052965586 [61] 0.0319658812 > (mypacf <- c(rpacf$acf)) [1] 0.8705570490 -0.1030560656 -0.2146432612 -0.0373925754 -0.2447384107 [6] -0.2536141020 -0.0681181839 -0.0422315165 -0.0421632482 -0.3321217529 [11] 0.0247985165 -0.1399944606 0.4423162483 -0.0929380681 0.1022539119 [16] 0.1040546544 -0.0941400783 -0.1887150917 -0.0904575727 0.0193835127 [21] 0.0926836471 -0.0815106111 -0.1062727003 0.0473118654 0.2033332490 [26] 0.1046319467 -0.0552480496 -0.0197894604 -0.1215274990 -0.0621951209 [31] -0.0178012267 0.0961434446 0.0616950753 0.0180093942 -0.0104207973 [36] 0.0500801593 0.0731714102 -0.1269365862 -0.0176339336 0.0134358825 [41] -0.0022759384 0.0748644922 -0.0795048119 -0.0485355676 0.0133743430 [46] -0.0916580629 -0.0013902723 -0.0117552896 -0.0228022055 -0.0635913018 [51] -0.0431474140 0.0003157374 0.0635043826 -0.0012358754 0.0522881665 [56] 0.0291882674 -0.0735311596 -0.1620038206 0.0405919564 -0.0394214826 > 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/32h9h1282207480.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/4nhp51282207480.tab") > > try(system("convert tmp/1zyst1282207480.ps tmp/1zyst1282207480.png",intern=TRUE)) character(0) > try(system("convert tmp/2zyst1282207480.ps tmp/2zyst1282207480.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.615 0.318 3.802