R version 2.6.1 (2007-11-26) Copyright (C) 2007 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(99.9,99.9,99.9,99.9,99.9,99.7,99.6,99.5,100.6,100.2,100.1,100.2,99.1,99.5,99.5,99.6,99.5,99.6,99.8,99.9,100.5,100.5,100.5,100.5,99.5,99.9,100.4,99.6,99.5,99.6,98.4,99.9,100.3,100.3,101.3,101,99.7,99.4,99.9,100.7,99.8,98.8,99.6,99.1,100.3,100.5,100.8,100.6,99.1,98.8,99,99.9,99.5,99.2,99.6,100.1,99.8,101.6,101.7,101.9,100,102,102,102.9,102.7,102.7,102.7,102.7,102.6,102.6,102.5,102.5,102.1,103.5,103.2,102.1,103.8,104,103.9,104.1) > 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/1bgqu1198585773.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/2e7pk1198585773.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.838565704 0.742580543 0.667918810 0.608643321 [6] 0.596339151 0.562431350 0.494021252 0.449412820 0.395573264 [11] 0.395233751 0.400062423 0.393026065 0.311237842 0.214493020 [16] 0.164635456 0.098491887 0.053920815 0.032849413 0.008596153 [21] -0.020050063 -0.074397097 -0.092000212 -0.095185339 -0.083370279 [26] -0.110668408 -0.119750246 -0.130858884 -0.139430130 -0.128552192 [31] -0.103016538 -0.087586863 -0.080743845 -0.116083793 -0.118552846 [36] -0.122569241 -0.119004595 -0.107858909 -0.103070711 -0.090769966 [41] -0.099696136 -0.107314693 -0.097380104 -0.097822358 -0.100811343 [46] -0.129501146 -0.172621390 -0.177145263 -0.184029066 -0.213114267 [51] -0.184546196 -0.187279885 -0.193027310 -0.171336660 -0.186181335 [56] -0.186421219 -0.179161011 -0.197483312 -0.205836623 -0.215718595 [61] -0.226603071 > (mypacf <- c(rpacf$acf)) [1] 0.8385657044 0.1327058588 0.0568279785 0.0426865900 0.1590534307 [6] -0.0017443218 -0.1159140343 0.0182093501 -0.0339777392 0.1307191243 [11] 0.0565929920 0.0293601370 -0.2430168391 -0.1732091985 0.0308752216 [16] -0.1387419189 -0.0643542106 0.0544582426 0.1146464503 -0.0282160224 [21] -0.1438346069 0.0260011475 -0.0073348700 0.0870976343 -0.0689171292 [26] 0.1229748734 0.0304465795 0.0273131606 0.0511153730 -0.0149594039 [31] 0.0026498595 -0.0197528554 -0.0717280277 -0.0295592616 -0.0693867561 [36] 0.0116145907 0.0134639544 -0.0056757860 -0.0049660226 -0.0495157357 [41] -0.0550002770 -0.0638090686 -0.0233947385 -0.0096538035 -0.0228789106 [46] -0.0978030583 0.0774671316 0.0241122857 -0.1782479265 0.1205780988 [51] 0.0132445468 0.0119153924 0.0894173769 -0.0838358995 0.0164676491 [56] -0.0108378633 0.0148699707 -0.0786230386 -0.0394813974 -0.0008651228 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > 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 1:par1) { + 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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/3xg1s1198585773.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-1,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(mytstat,lengthx),6)) + a<-table.row.end(a) + } > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/4rr1a1198585773.tab") > > system("convert tmp/1bgqu1198585773.ps tmp/1bgqu1198585773.png") > system("convert tmp/2e7pk1198585773.ps tmp/2e7pk1198585773.png") > > > proc.time() user system elapsed 1.546 0.543 1.655