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(23100 + ,22650 + ,22440 + ,22910 + ,22980 + ,22535 + ,22300 + ,22780 + ,22780 + ,23300 + ,23800 + ,24510 + ,24660 + ,24730 + ,25070 + ,24690 + ,24880 + ,23920 + ,23880 + ,23990 + ,24590 + ,23610 + ,23580 + ,23360 + ,23910 + ,23940 + ,23060 + ,22800 + ,23020 + ,22890 + ,22780 + ,22530 + ,22290 + ,22820 + ,22480 + ,22110 + ,22000 + ,22230 + ,22260 + ,22590 + ,22820 + ,22420 + ,22230 + ,21600 + ,21000 + ,21360 + ,21640 + ,21450 + ,21710 + ,21620 + ,21800 + ,21490 + ,21670 + ,22130 + ,22050 + ,22050 + ,22140 + ,22390 + ,22220 + ,21790 + ,21510 + ,21670 + ,21745 + ,21850 + ,22105 + ,22050 + ,21670 + ,21680 + ,21800 + ,21920 + ,21980 + ,22270 + ,21740 + ,21950 + ,22010 + ,21890 + ,21920 + ,22110 + ,22340 + ,22210 + ,22240 + ,21960 + ,22220 + ,22060 + ,22090 + ,21960 + ,21940 + ,21790 + ,21710 + ,21690 + ,21710 + ,21670 + ,21640 + ,21500 + ,21290 + ,21250 + ,21580 + ,21670 + ,21620 + ,21510 + ,21360 + ,21420 + ,21470 + ,21370 + ,21370 + ,21340 + ,21130 + ,21130 + ,20990 + ,21240 + ,21320 + ,21430 + ,21390 + ,21530 + ,21510 + ,21630 + ,21560 + ,21610 + ,21560 + ,21310 + ,21340 + ,21410 + ,21550 + ,21380 + ,21600 + ,21530 + ,21560 + ,21670 + ,21540 + ,21540 + ,21550 + ,21590 + ,21420 + ,21420 + ,21370 + ,21380 + ,21210 + ,21505 + ,21365 + ,21385 + ,21350 + ,21360 + ,21530 + ,21380 + ,21630 + ,22145 + ,22315 + ,22340 + ,22440 + ,22135 + ,21955 + ,22060 + ,22050 + ,22035 + ,22280 + ,22315 + ,22205 + ,21970 + ,22075 + ,22115 + ,22105 + ,21885 + ,21805 + ,21910 + ,21995 + ,22245 + ,22100 + ,22130 + ,22300 + ,22915 + ,23040 + ,22880 + ,23000 + ,23160 + ,23020 + ,22770 + ,22660 + ,22740 + ,22905 + ,22720 + ,22705 + ,22735 + ,22600 + ,22510 + ,22560 + ,22575 + ,22685 + ,22980 + ,23275 + ,23845 + ,23640 + ,23640 + ,23835 + ,23625 + ,24055 + ,24005 + ,24325 + ,24445 + ,24670 + ,24615 + ,24700 + ,25065 + ,25185 + ,25220 + ,25235 + ,24975 + ,25055 + ,25520 + ,25880 + ,25960 + ,25740 + ,24965 + ,25235 + ,24895 + ,24635 + ,24835 + ,24635 + ,24695 + ,25090 + ,25220 + ,24740 + ,25005 + ,24650 + ,24460 + ,24680 + ,24840 + ,24630 + ,24490 + ,24695) > par7 = '0.95' > par6 = 'White Noise' > 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: > 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 (par6 == 'White Noise') par6 <- 'white' else par6 <- 'ma' > par7 <- as.numeric(par7) > 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/13x711273095818.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > racf <- acf(x, par1, main='Autocorrelation', xlab='time lag', ylab='ACF', ci.type=par6, ci=par7, sub=paste('(lambda=',par2,', d=',par3,', D=',par4,', CI=', par7, ', CI type=',par6,')',sep='')) > dev.off() null device 1 > postscript(file="/var/www/html/rcomp/tmp/23x711273095818.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.0109488535 -0.0659269890 -0.0771215036 0.0680965690 [6] -0.0131645603 0.0030129085 -0.0843495394 -0.0055972814 0.1599665373 [11] -0.1219234798 0.0006571405 -0.0699612329 0.0499346193 -0.0657330152 [16] 0.0358838835 -0.0076566723 0.0778120450 -0.0191708674 -0.1020604214 [21] 0.0272226122 0.0667036919 -0.0643565654 -0.0320765471 -0.0031616929 [26] 0.0637378454 0.0175433916 -0.0658250738 0.0287951111 0.0561640733 [31] 0.0333440771 -0.0633171941 -0.0229782721 -0.0405113712 0.0216284991 [36] -0.0761431663 -0.0152691250 0.0041202914 0.0306974958 0.0042195942 [41] -0.0066192768 0.0034319988 0.0143295651 0.0952895365 0.0192607573 [46] 0.0223966330 -0.0135995770 -0.0334800844 -0.0710113223 > (mypacf <- c(rpacf$acf)) [1] 0.010948853 -0.066054785 -0.075969314 0.065818367 -0.024770735 [6] 0.006176209 -0.077704532 -0.010486700 0.156480775 -0.147113973 [11] 0.038174824 -0.070256877 0.018148943 -0.056746285 0.018992657 [16] 0.029258570 0.046043467 -0.032557561 -0.073937633 0.026112838 [21] 0.062906561 -0.106967872 0.029659196 -0.037368726 0.070159174 [26] -0.027519771 -0.036931817 0.082664420 0.005498017 0.016975871 [31] -0.025705210 -0.029010559 -0.030801659 -0.039708216 -0.041673938 [36] -0.005695478 -0.009411126 -0.004147664 0.022345094 0.021828963 [41] -0.022011500 0.021344216 0.090875270 0.046446740 0.002743367 [46] -0.021372532 -0.030174416 -0.055572466 > 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/3oy5p1273095818.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/4aymv1273095818.tab") > > try(system("convert tmp/13x711273095818.ps tmp/13x711273095818.png",intern=TRUE)) character(0) > try(system("convert tmp/23x711273095818.ps tmp/23x711273095818.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.568 0.316 0.727