R version 2.6.0 (2007-10-03) 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(3.926,3.517,4.142,4.353,5.029,4.755,3.862,4.406,4.567,4.863,4.121,3.626,3.804,3.491,4.151,4.254,4.717,4.866,4.001,3.758,4.78,5.016,4.296,4.467,3.891,3.872,3.867,3.973,4.64,4.538,3.836,3.77,4.374,4.497,3.945,3.862,3.608,3.301,3.882,3.605,4.305,4.216,3.971,3.988,4.317,4.484,4.247,3.52,3.687,3.405,3.99,4.047,4.549,4.559,3.926,4.206,4.517,4.387,3.219,3.129) > 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: 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/1vi821196158545.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/2gv671196158545.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.419586252 -0.085144749 -0.193771378 -0.082251604 [6] 0.036132535 -0.073646097 -0.064461075 -0.104665134 -0.140176953 [11] -0.010922059 0.283309267 0.520658178 0.205540682 -0.146058777 [16] -0.178367972 -0.083546508 -0.003096881 -0.023700463 -0.056616097 [21] -0.090700228 -0.096566795 -0.057687371 0.161807860 0.322589450 [26] 0.117991652 -0.146513243 -0.162111371 -0.029676486 -0.021420553 [31] -0.116871477 -0.115071005 -0.118749545 -0.102616889 -0.039558522 [36] 0.081829290 0.208528180 0.034205217 -0.111157782 -0.074444608 [41] -0.009502379 -0.035468656 -0.142540937 -0.110764444 -0.101064580 [46] -0.045841479 0.063192846 0.121401485 0.175350065 > (mypacf <- c(rpacf$acf)) [1] 0.419586252 -0.317007347 -0.018496520 0.007193450 0.023171231 [6] -0.177696654 0.082152600 -0.169870716 -0.078541193 0.075668436 [11] 0.306115206 0.308324791 -0.130595366 -0.032023615 0.010593246 [16] -0.087940592 -0.031558869 0.085832976 -0.028687205 -0.025292638 [21] 0.007840819 -0.142057469 0.047263275 0.060642872 -0.040288430 [26] -0.035707604 0.051942753 -0.002263990 -0.127992305 -0.112167472 [31] 0.024669846 -0.104078339 -0.040212651 0.060566942 -0.074628412 [36] -0.010696243 -0.072282552 0.039979159 -0.020990449 -0.007555690 [41] -0.023662424 -0.039743932 -0.004578030 -0.073654719 0.065723708 [46] 0.063480184 0.022857195 0.039024924 > 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/3nds31196158546.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/4rxo21196158546.tab") > > system("convert tmp/1vi821196158545.ps tmp/1vi821196158545.png") > system("convert tmp/2gv671196158545.ps tmp/2gv671196158545.png") > > > proc.time() user system elapsed 0.874 0.329 1.146