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(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 = '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/1xnel1272918323.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/2pwd51272918323.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.000000000 -0.363162243 -0.050412978 0.001491990 -0.019835785 [6] 0.059436736 -0.174167004 0.093576496 -0.075366769 -0.039640658 [11] 0.121581493 -0.209249888 0.339824684 -0.153489197 0.065893353 [16] -0.052778070 -0.025138071 0.116730222 -0.146332989 0.061602213 [21] -0.060662728 0.004654302 0.134897370 -0.284050924 0.314797951 [26] -0.166074691 0.043898546 -0.044741423 0.039987951 0.069371184 [31] -0.070145414 0.041553010 -0.089772990 -0.022410521 0.146383595 [36] -0.227612172 0.262470210 -0.252455022 0.155967234 0.029909762 [41] -0.061959787 0.074704196 -0.104795585 0.103688767 -0.107018317 [46] -0.022718957 0.120041719 -0.226979602 0.258710720 > (mypacf <- c(rpacf$acf)) [1] -0.3631622432 -0.2099954198 -0.1167986198 -0.0913052607 0.0114151042 [6] -0.1867856753 -0.0586235629 -0.1365731834 -0.1685283519 -0.0056130258 [11] -0.2479236178 0.1797060726 -0.0018862300 0.0845938005 -0.0288331324 [16] -0.0160181021 0.0527497009 0.0004050326 0.0110367088 -0.0298769643 [21] 0.0151599440 0.0953900741 -0.1579850572 0.1113808459 -0.0547374820 [26] -0.0237886310 -0.0771829834 0.0432342639 -0.0120687767 0.0941219964 [31] 0.0032843206 -0.0601319865 -0.0624358475 -0.0066805427 -0.0851322599 [36] 0.1095557491 -0.1572859733 0.0403551856 0.0769496696 0.0038537838 [41] -0.0028169188 -0.0381790486 0.0062340721 -0.0385759049 -0.0043270630 [46] -0.0487552623 -0.0735190621 0.0444023342 > 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/3bxct1272918323.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/446te1272918323.tab") > > try(system("convert tmp/1xnel1272918323.ps tmp/1xnel1272918323.png",intern=TRUE)) character(0) > try(system("convert tmp/2pwd51272918323.ps tmp/2pwd51272918323.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.618 0.315 0.795