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(8.9722,8.8284,8.7446,8.7519,8.6337,8.7272,8.6330,8.5865,8.5968,8.5114,8.3884,8.2671,8.2410,8.3177,8.4070,8.3917,8.4145,8.5245,8.6289,8.6622,8.9055,8.9770,9.1264,9.1120,9.0576,9.2106,9.2637,9.3107,9.6744,9.5780,9.4166,9.4359,9.2275,9.1828,9.0594,9.1358,9.2208,9.1137,9.2689,9.2489,9.1679,9.1051,9.0818,9.0961,9.1733,9.1455,9.2265,9.1541,9.1559,9.1182,9.1856,9.2378,9.0682,9.0105,8.9939,9.0228,9.1368,9.1763,9.2346,9.1653,9.1277,9.1430,9.1962,9.1861,9.0920,9.0620,8.9981,8.9819,9.0476,9.0852,9.0884,9.1670,9.1931,9.2628,9.4276,9.3398,9.3342,9.4223,9.5614,9.4316,9.3111,9.3414,9.4017,9.3346,9.3310,9.2349,9.2170,9.2098,9.2665,9.2533,9.1008,9.0377,9.0795,9.1896,9.2992,9.2372,9.2061,9.3290,9.1842,9.3231,9.2835,9.1735,9.2889,9.4319,9.4314,9.3642,9.4020,9.3699,9.3106,9.3739,9.4566,9.3984,9.5637,9.8506) > 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/16c931244027990.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/2av6m1244027990.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.9226704420 0.8546622213 0.8005551790 0.7277793535 [6] 0.6673190663 0.6065196672 0.5377721956 0.4618960239 0.3843384063 [11] 0.3132140604 0.2280540629 0.1488705772 0.0981639462 0.0482054649 [16] 0.0133223940 -0.0149290386 -0.0489427140 -0.0581412567 -0.0652669325 [21] -0.0701453520 -0.0715479282 -0.0640871191 -0.0501483221 -0.0448021173 [26] -0.0361560539 -0.0296144834 -0.0200820570 0.0051445548 0.0270623423 [31] 0.0439620501 0.0526701464 0.0478555462 0.0441776085 0.0451300502 [36] 0.0426818901 0.0279771541 0.0170813458 0.0158283288 0.0116039158 [41] 0.0006586751 0.0026984525 0.0063616324 0.0111897036 0.0120664321 [46] 0.0207951791 0.0350956657 0.0480766605 0.0676132954 0.0799305544 [51] 0.0845849354 0.0800892875 0.0700790299 0.0650337360 0.0509278854 [56] 0.0333852349 0.0099265852 -0.0195523507 -0.0484191746 -0.0718589414 [61] -0.0932120004 > (mypacf <- c(rpacf$acf)) [1] 0.9226704420 0.0224743975 0.0603604788 -0.1455774750 0.0379627583 [6] -0.0522173771 -0.0660475039 -0.1170974918 -0.0690140749 -0.0166081806 [11] -0.1457286493 -0.0341997397 0.1122429720 0.0135227401 0.0795271199 [16] -0.0060066566 -0.0266727154 0.1291228264 -0.0046592888 -0.0006265901 [21] -0.0446933137 0.0532839308 -0.0043748362 -0.0708488042 -0.0161932727 [26] -0.0389403977 0.0680001547 0.0759864835 0.0005034823 0.0287382876 [31] -0.0531366401 -0.0676588591 -0.0233186498 0.0316467242 0.0019673003 [36] -0.1116344629 0.0089229915 0.0381450876 0.0561148151 -0.0160127678 [41] 0.0816275991 0.0797143189 0.0353150320 -0.0728615391 0.0536036058 [46] 0.0579148250 0.0165568823 -0.0264228772 -0.0684648586 -0.0345055189 [51] -0.1011385966 -0.0793951239 -0.0137314660 -0.0213861066 0.0144620725 [56] -0.0781464416 -0.0479862124 0.0062328841 0.0759431423 0.0575676642 > 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/3bm9t1244027990.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/4uvxj1244027990.tab") > > system("convert tmp/16c931244027990.ps tmp/16c931244027990.png") > system("convert tmp/2av6m1244027990.ps tmp/2av6m1244027990.png") > > > proc.time() user system elapsed 0.594 0.338 0.769