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(2863,2688,3041,3119,3102,4608,3466,3748,4541,3650,4274,3827,3778,3453,4160,3595,3914,4159,3676,3794,3446,3504,3958,3353,3480,3098,2944,3389,3497,4404,3849,3734,3060,3507,3287,3215,3764,2734,2837,2766,3851,3289,3848,3348,3682,4058,3655,3811,3341,3032,3475,3353,3186,3902,4164,3499,4145,3796,3711,3949,3740,3243,4407,4814,3908,5250,3937,4004,5560,3922,3759,4138,4634,3996,4307,4142,4429,5219,4929,5754,5591,4162,4947,5208,4754,4487,5719,5719,4994,6032,4897,5339,5571,4635,4733,5004,5322,4168,4633,4763,4252,4996,4261,4084,5084,4236) > par5 = '12' > par4 = '0' > par3 = '1' > 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/1z6q51197559087.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/2tlvk1197559087.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.00000000 -0.49172014 -0.10199424 0.31983449 -0.26522730 0.03646809 [7] 0.09270922 -0.02555172 -0.22438968 0.32946469 -0.18208604 -0.10119981 [13] 0.35889590 -0.29678736 0.08015669 0.14728624 -0.21721617 0.04830111 [19] 0.08816062 -0.07096004 -0.10225616 0.16052807 -0.12560462 -0.00152521 [25] 0.20813956 -0.17470686 0.06054489 0.01343709 -0.03328087 -0.02768465 [31] 0.02467834 -0.10497010 0.05444131 0.07831597 -0.06583099 -0.04975351 [37] 0.13648630 -0.04466678 -0.06303173 0.12262992 -0.10530553 -0.02334542 [43] 0.05855613 -0.03097170 -0.01402532 -0.02729669 0.07771837 -0.07745738 [49] 0.04089134 > (mypacf <- c(rpacf$acf)) [1] -0.491720135 -0.453413089 0.039827740 -0.110054135 -0.091116872 [6] -0.075728279 0.085607898 -0.302522529 0.076824414 -0.088482583 [11] -0.080619024 0.138759632 0.046427542 0.067444490 0.127117524 [16] -0.036158974 -0.019082672 -0.050555329 0.038430226 -0.085198148 [21] -0.104051385 -0.099699601 -0.056526820 0.035195467 0.107687130 [26] 0.073604512 -0.040982872 0.044863155 -0.043279575 -0.058756791 [31] -0.243239711 -0.039684676 -0.040156820 0.139801628 -0.140041929 [36] 0.045920769 -0.011136626 -0.007008012 -0.025166047 0.035771371 [41] -0.076822316 -0.024827121 -0.026059832 0.097075076 -0.144452547 [46] 0.024645471 -0.088021657 -0.088439137 > 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/3zhtb1197559088.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/4ymi61197559088.tab") > > system("convert tmp/1z6q51197559087.ps tmp/1z6q51197559087.png") > system("convert tmp/2tlvk1197559087.ps tmp/2tlvk1197559087.png") > > > proc.time() user system elapsed 1.530 0.546 1.620