R version 2.8.0 (2008-10-20) Copyright (C) 2008 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(196.9 + ,192.1 + ,201.8 + ,186.9 + ,218 + ,214.4 + ,227.5 + ,204.1 + ,225.8 + ,223.7 + ,244.7 + ,243.9 + ,257.3 + ,234.5 + ,251.4 + ,243.8 + ,247.4 + ,245.3 + ,262.5 + ,270 + ,259.9 + ,262.2 + ,244.9 + ,249.3 + ,268.2 + ,231.2 + ,264.3 + ,252.7 + ,275.5 + ,261.5 + ,275.5 + ,272.3 + ,268.6 + ,270.4 + ,267.7 + ,275 + ,272.6 + ,248.6 + ,279.4 + ,270.5 + ,292.8 + ,297.8 + ,296.8 + ,290.9 + ,282.8 + ,312.8 + ,303.2 + ,301.4 + ,289.8 + ,279.6 + ,302.2 + ,299.1 + ,319.7 + ,310.9 + ,315.2 + ,338.5 + ,315.6 + ,321.2 + ,318.5 + ,342.7 + ,261.4 + ,287 + ,331.5 + ,326.9 + ,338.6 + ,337 + ,358.4 + ,344.5 + ,345.7 + ,344.1 + ,317.4 + ,354.5 + ,345.2 + ,314.1 + ,352.5 + ,361.2 + ,365.9 + ,332.5 + ,364 + ,359.1 + ,345.6 + ,366.9 + ,370.2 + ,359.9 + ,366.6 + ,336.3 + ,368.5 + ,374.2 + ,384.3 + ,358.9 + ,407.7 + ,433.3 + ,404.7 + ,392.7 + ,409.7 + ,416.5 + ,414.3 + ,404.3 + ,421.4 + ,372.6 + ,404.7 + ,420.2 + ,438.4 + ,449.1 + ,445.8 + ,413.8 + ,420.5 + ,442.3 + ,438.9 + ,394.5 + ,416.8 + ,402.9 + ,424.5 + ,432.3 + ,484.1 + ,492.7 + ,496.3 + ,471.9 + ,491.2 + ,512.9 + ,482.4 + ,407.9 + ,448.5 + ,431.1 + ,498.8 + ,497.1 + ,517.1 + ,487.7 + ,512.5 + ,550.1 + ,532.5 + ,524.1 + ,515.7 + ,461 + ,529.3 + ,467.4 + ,559.8 + ,536.5 + ,531.9 + ,546.5 + ,547.4 + ,536.1 + ,482.8 + ,551 + ,532.9 + ,484.1 + ,554.8 + ,537 + ,558 + ,511.4 + ,502.9 + ,558.6 + ,545.1 + ,574.3 + ,542.2 + ,600 + ,588.6 + ,524.4 + ,618.5 + ,580.9 + ,557.2 + ,571.2 + ,597.5 + ,601.7 + ,558.9 + ,600.9 + ,601 + ,615.7 + ,578.1 + ,495.9 + ,526.8 + ,522.1 + ,605.1 + ,574.4 + ,609.7 + ,580.7 + ,565.1 + ,590.7 + ,571.5 + ,601.3 + ,567.3 + ,467.9 + ,588.9 + ,579.4 + ,502.6 + ,568.7 + ,616 + ,586.2 + ,575.5 + ,599.9 + ,568.2 + ,516 + ,493.4 + ,496.8 + ,529.9 + ,491.7 + ,543.2 + ,490.8 + ,554.7 + ,625.7 + ,605 + ,645.2 + ,645.2 + ,611.8 + ,600.3 + ,549.8 + ,635.5 + ,617.7 + ,643.5 + ,485.7 + ,689.5 + ,692 + ,677.3 + ,704.7 + ,668.6 + ,717.8 + ,689.8 + ,640.4 + ,675.2 + ,528.1 + ,538 + ,527.2 + ,655.6 + ,650.6 + ,623.7 + ,748.4 + ,727.4 + ,750.5 + ,678.9 + ,659.5 + ,691.9 + ,639.8 + ,663.8 + ,572.9 + ,592.5 + ,734.8 + ,696.1 + ,589.2 + ,662.9 + ,661.2 + ,672.1 + ,583.7 + ,705.5 + ,631 + ,733.3 + ,674.9 + ,695.5 + ,634.1 + ,630.6 + ,635.2 + ,554.1 + ,623.9 + ,679.3 + ,565.6 + ,564.1 + ,637.2 + ,650.8 + ,602.7 + ,587.5 + ,619.2 + ,616.5 + ,637.9 + ,557.9 + ,594 + ,668.7 + ,603.3 + ,674.5 + ,573.4 + ,706 + ,693.7 + ,627.5 + ,550.7 + ,592.3 + ,660.2 + ,597.3 + ,641 + ,663.6 + ,595.9 + ,638.4 + ,665.4 + ,671.4 + ,637 + ,685.7 + ,705.8 + ,704.8 + ,734.4 + ,674.2 + ,748.6 + ,763.4 + ,658 + ,627.5 + ,528.9 + ,488.3 + ,575.5 + ,735.6 + ,685.3 + ,613.6 + ,629.5 + ,634.7 + ,652.6 + ,728.3 + ,634.3 + ,690.7 + ,676.3 + ,675.4 + ,595.6 + ,712.4 + ,735.8 + ,544.4 + ,567 + ,510 + ,564 + ,630.7 + ,496.7 + ,660.9 + ,601.2 + ,655.2 + ,591.6 + ,606.1 + ,560.7 + ,368.3 + ,371.6 + ,413.9 + ,413.9 + ,389 + ,399.2 + ,429.8 + ,395.6 + ,472 + ,486 + ,525 + ,396 + ,511 + ,525 + ,492 + ,517 + ,525 + ,474 + ,539 + ,468 + ,543 + ,532 + ,565 + ,535 + ,534 + ,546 + ,494 + ,552 + ,511 + ,451 + ,537 + ,494 + ,549 + ,544 + ,598 + ,583 + ,582 + ,589 + ,578 + ,561 + ,592 + ,504 + ,545 + ,547 + ,585 + ,562 + ,520 + ,581 + ,590 + ,562 + ,548 + ,567 + ,542 + ,473 + ,531 + ,462 + ,479 + ,533 + ,552 + ,547 + ,562 + ,524 + ,479 + ,445 + ,406 + ,475 + ,589 + ,495 + ,484 + ,536 + ,555 + ,565 + ,564 + ,573 + ,569 + ,588 + ,546 + ,508 + ,560 + ,558 + ,516 + ,549 + ,595 + ,586 + ,597 + ,592 + ,538 + ,590 + ,576 + ,451 + ,538 + ,555 + ,532 + ,530 + ,553 + ,626 + ,601 + ,573 + ,569 + ,562 + ,468 + ,483 + ,460 + ,411 + ,458 + ,455 + ,600 + ,605 + ,545 + ,549 + ,415 + ,568 + ,577 + ,517 + ,558 + ,518 + ,489 + ,502 + ,569 + ,540 + ,550 + ,557 + ,542 + ,542 + ,582 + ,525 + ,584 + ,562 + ,639 + ,613 + ,604 + ,613 + ,625 + ,654 + ,638) > par7 = '0.95' > par6 = 'White Noise' > 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: > 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/freestat/rcomp/tmp/1wn5l1272918033.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/freestat/rcomp/tmp/27xm61272918033.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.0000000 0.9187480 0.8907541 0.8710311 0.8506449 0.8345208 0.8092573 [8] 0.8098167 0.7968223 0.7954340 0.8007648 0.7879415 0.8066872 0.7756122 [15] 0.7660754 0.7475255 0.7366165 0.7290523 0.7051922 0.7038587 0.6931903 [22] 0.6904078 0.6876678 0.6632433 0.6811529 0.6556974 0.6511247 0.6413849 [29] 0.6367782 0.6271883 0.6091354 0.6019439 0.5892271 0.5888218 0.5913968 [36] 0.5724110 0.5858250 0.5601288 0.5707538 0.5589958 0.5419991 0.5362190 [43] 0.5199206 0.5190314 0.5021420 0.5010211 0.5058552 0.4904422 0.5082918 > (mypacf <- c(rpacf$acf)) [1] 0.918748045 0.299265645 0.159330999 0.071008565 0.061367806 [6] -0.031139209 0.152115128 0.022626068 0.099923169 0.121662119 [11] -0.028053423 0.194795612 -0.194711305 -0.002677053 -0.076030530 [16] 0.034355049 0.004829919 -0.041947493 0.022860744 0.003825399 [21] 0.032923668 -0.012028634 -0.094465215 0.141417544 -0.097764276 [26] 0.034759314 0.011045509 0.042711263 -0.060792302 0.009413012 [31] -0.070259588 0.009398718 0.062763949 0.036868614 -0.011012688 [36] 0.061861161 -0.126221626 0.132139670 -0.059922162 -0.079541264 [41] 0.007280031 0.001790414 0.024940443 -0.028751129 0.032683876 [46] 0.010420964 0.026381506 0.058628611 > lengthx <- length(x) > sqrtn <- sqrt(lengthx) > > #Note: the /var/www/html/freestat/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/freestat/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/freestat/rcomp/tmp/3sf2u1272918033.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/freestat/rcomp/tmp/4lojx1272918033.tab") > > try(system("convert tmp/1wn5l1272918033.ps tmp/1wn5l1272918033.png",intern=TRUE)) character(0) > try(system("convert tmp/27xm61272918033.ps tmp/27xm61272918033.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.862 0.439 0.976