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.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) > par5 = '12' > par4 = '0' > par3 = '1' > 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/1aunc1244380719.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/2du4u1244380719.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.0671212393 -0.0449858718 0.0918338320 -0.1312206356 [6] 0.0800899422 0.0164469227 -0.0106509506 0.0638249197 -0.1995920061 [11] 0.0495591824 0.0338296571 -0.1749370649 -0.0932841298 -0.1643880069 [16] 0.0592111499 -0.0330990556 -0.1643506170 0.0098893385 -0.0445670066 [21] 0.0622957073 0.0491910582 0.0435135824 0.0606750229 -0.1074020290 [26] 0.0173255355 0.0154777490 -0.0885941933 0.0234686248 -0.0277075434 [31] 0.0673194262 0.0599571318 -0.0009310502 -0.0266261591 -0.0028034440 [36] -0.0145274430 0.0272717373 -0.0078872545 0.0373381491 -0.0946277769 [41] -0.0515294986 -0.0395252972 -0.0042334526 0.1135854868 -0.0902213965 [46] -0.0708575202 0.0752887495 -0.0717954568 0.0286813071 0.1214784240 [51] 0.0472958232 0.0136794669 -0.0519671467 0.1049638782 0.0397629430 [56] 0.0070193400 0.1052700143 0.0009902249 0.0150071990 -0.0202920808 [61] -0.0331200798 > (mypacf <- c(rpacf$acf)) [1] 0.0671212393 -0.0497151121 0.0990302111 -0.1498436485 0.1174926032 [6] -0.0299411935 0.0343117734 0.0202935585 -0.1879201812 0.0942620927 [11] -0.0214919848 -0.1228294452 -0.1474133207 -0.1267084155 0.1151736739 [16] -0.1126527753 -0.1170486961 -0.0638690610 0.0276072890 0.1053850757 [21] -0.0734144254 0.0728393861 -0.0077814703 -0.0395488955 -0.0297805853 [26] -0.1308197637 -0.0519878684 -0.0406555711 -0.0238622560 -0.0027428125 [31] -0.0108112782 0.0915179747 -0.1108363316 0.0802434347 -0.0513197845 [36] 0.0360952223 -0.0218908200 -0.0135887430 -0.0939129301 -0.0953072402 [41] -0.1001812644 -0.0137617084 0.0919127449 -0.1174469671 -0.0933334387 [46] 0.1100223996 -0.0315137995 0.0406752676 0.0874973238 0.0677737487 [51] -0.0288629036 -0.0915919944 0.0511676322 -0.0761386101 0.1200224689 [56] -0.0005747681 -0.0395195558 0.0354445765 -0.0326920309 0.0791339031 > 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/3xchb1244380720.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/4oeqk1244380720.tab") > > system("convert tmp/1aunc1244380719.ps tmp/1aunc1244380719.png") > system("convert tmp/2du4u1244380719.ps tmp/2du4u1244380719.png") > > > proc.time() user system elapsed 0.570 0.311 0.863