R version 2.15.2 (2012-10-26) -- "Trick or Treat" Copyright (C) 2012 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-pc-linux-gnu (32-bit) 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(571000 + ,584000 + ,599000 + ,582000 + ,530000 + ,528000 + ,536000 + ,546000 + ,559000 + ,562000 + ,541000 + ,539000 + ,548000 + ,563000 + ,581000 + ,572000 + ,519000 + ,521000 + ,531000 + ,540000 + ,548000 + ,556000 + ,551000 + ,549000 + ,564000 + ,586000 + ,604000 + ,601000 + ,545000 + ,537000 + ,552000 + ,563000 + ,575000 + ,580000 + ,575000 + ,558000 + ,564000 + ,581000 + ,597000 + ,587000 + ,536000 + ,524000 + ,537000 + ,536000 + ,533000 + ,528000 + ,516000 + ,502000 + ,506000 + ,518000 + ,534000 + ,528000 + ,478000 + ,469000 + ,490000 + ,493000 + ,508000 + ,517000 + ,514000 + ,510000 + ,527000 + ,542000 + ,565000 + ,555000 + ,499000 + ,511000 + ,526000 + ,532000 + ,549000 + ,561000 + ,557000 + ,566000 + ,588000 + ,620000 + ,626000 + ,620000 + ,573000 + ,573000 + ,574000 + ,580000 + ,590000 + ,593000 + ,597000 + ,595000 + ,612000 + ,628000 + ,629000 + ,621000 + ,569000 + ,567000 + ,573000 + ,584000 + ,589000 + ,591000 + ,595000 + ,594000 + ,611000 + ,613000 + ,611000 + ,594000 + ,543000 + ,537000 + ,544000 + ,555000 + ,561000 + ,562000 + ,555000 + ,547000 + ,565000 + ,578000 + ,580000 + ,569000 + ,507000 + ,501000 + ,509000 + ,510000 + ,517000 + ,519000 + ,512000 + ,509000 + ,519000 + ,523000 + ,525000 + ,517000 + ,456000 + ,455000 + ,461000 + ,470000 + ,475000 + ,476000 + ,471000 + ,471000 + ,503000 + ,513000 + ,510000 + ,484000 + ,431000 + ,436000 + ,443000 + ,448000 + ,460000 + ,467000 + ,460000 + ,464000 + ,485000 + ,501000 + ,521000 + ,488000 + ,439000 + ,442000 + ,457000 + ,462000 + ,481000 + ,493000) > par1 = '12' > par1 <- '12' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: root > #To cite this work: Wessa P., (2012), Variance Reduction Matrix (v1.0.3) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_variancereduction.wasp/ > #Source of accompanying publication: > # > par1 <- as.numeric(par1) > n <- length(x) > sx <- sort(x) > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Variance Reduction Matrix',6,TRUE) > a<-table.row.end(a) > for (bigd in 0:2) { + for (smalld in 0:3) { + mylabel <- 'V(Y[t],d=' + mylabel <- paste(mylabel,as.character(smalld),sep='') + mylabel <- paste(mylabel,',D=',sep='') + mylabel <- paste(mylabel,as.character(bigd),sep='') + mylabel <- paste(mylabel,')',sep='') + a<-table.row.start(a) + a<-table.element(a,mylabel,header=TRUE) + myx <- x + if (smalld > 0) myx <- diff(myx,lag=1,differences=smalld) + if (bigd > 0) myx <- diff(myx,lag=par1,differences=bigd) + a<-table.element(a,var(myx)) + a<-table.element(a,'Range',header=TRUE) + a<-table.element(a,max(myx)-min(myx)) + a<-table.element(a,'Trim Var.',header=TRUE) + smyx <- sort(myx) + sn <- length(smyx) + a<-table.element(a,var(smyx[smyx>quantile(smyx,0.05) & smyx a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/1w0gq1353432196.tab") > postscript(file="/var/wessaorg/rcomp/tmp/2nrtp1353432196.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > op <- par(mfrow=c(2,2)) > plot(x,type='l',xlab='time',ylab='value',main='d=0, D=0') > plot(diff(x,lag=1,differences=1),type='l',xlab='time',ylab='value',main='d=1, D=0') > plot(diff(x,lag=par1,differences=1),type='l',xlab='time',ylab='value',main='d=0, D=1') > plot(diff(diff(x,lag=1,differences=1),lag=par1,differences=1),type='l',xlab='time',ylab='value',main='d=1, D=1') > par(op) > dev.off() null device 1 > > try(system("convert tmp/2nrtp1353432196.ps tmp/2nrtp1353432196.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 2.150 0.309 2.453