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(8.64 + ,8.89 + ,8.87 + ,8.81 + ,8.87 + ,9.06 + ,9.12 + ,8.66 + ,8.17 + ,8.04 + ,7.71 + ,7.55 + ,7.52 + ,7.38 + ,7.52 + ,7.31 + ,6.92 + ,7.09 + ,7.05 + ,7.37 + ,7.05 + ,6.79 + ,6.35 + ,6.44 + ,6.89 + ,7.16 + ,7.46 + ,7.91 + ,7.86 + ,8.02 + ,8.38 + ,8.50 + ,8.40 + ,8.24 + ,8.33 + ,8.28 + ,8.15 + ,8.06 + ,7.79 + ,7.28 + ,7.52 + ,7.23 + ,7.13 + ,7.21 + ,6.99 + ,6.77 + ,6.69 + ,6.39 + ,6.85 + ,6.74 + ,6.56 + ,6.62 + ,6.71 + ,6.67 + ,6.54 + ,6.14 + ,6.13 + ,5.86 + ,5.88 + ,5.75 + ,5.53 + ,5.86 + ,5.90 + ,5.95 + ,5.69 + ,5.53 + ,5.71 + ,5.60 + ,5.73 + ,5.60 + ,5.41 + ,5.13 + ,5.00 + ,5.04 + ,5.10 + ,4.96 + ,4.90 + ,4.80 + ,4.48 + ,4.29 + ,4.27 + ,4.18 + ,4.02 + ,3.82 + ,4.13 + ,4.16 + ,3.98 + ,4.26 + ,4.70 + ,4.96 + ,5.13 + ,5.35 + ,5.41 + ,5.42 + ,5.51 + ,5.75 + ,5.67 + ,5.46 + ,5.56 + ,5.56 + ,5.54 + ,5.53 + ,5.65 + ,5.58 + ,5.57 + ,5.36 + ,5.23 + ,5.11 + ,5.07 + ,5.04 + ,5.34 + ,5.43 + ,5.31 + ,5.12 + ,4.97 + ,5.00 + ,4.64 + ,4.80 + ,5.10 + ,5.11 + ,5.12 + ,5.36 + ,5.26 + ,5.27 + ,5.10 + ,4.94 + ,4.68 + ,4.41 + ,4.60 + ,4.53 + ,4.18 + ,4.00 + ,3.87 + ,4.09 + ,4.13 + ,3.74 + ,3.81 + ,4.11 + ,4.14 + ,3.99 + ,4.28 + ,4.37 + ,4.24 + ,4.19 + ,4.01 + ,3.95 + ,4.30 + ,4.37 + ,4.40 + ,4.29 + ,4.12 + ,4.07 + ,3.93 + ,3.79 + ,3.67 + ,3.53 + ,3.69 + ,3.69 + ,3.48 + ,3.31 + ,3.16 + ,3.25 + ,3.14 + ,3.19 + ,3.43 + ,3.45 + ,3.31 + ,3.51 + ,3.53 + ,3.83 + ,4.02 + ,3.99 + ,4.11 + ,3.96 + ,3.83 + ,3.71 + ,3.81 + ,3.73 + ,3.99 + ,4.17 + ,4.00 + ,4.10 + ,4.24 + ,4.45 + ,4.62 + ,4.49 + ,4.45 + ,4.49 + ,4.36 + ,4.32 + ,4.45 + ,4.13 + ,4.14 + ,4.30 + ,4.42 + ,4.67 + ,4.96 + ,4.73 + ,4.52 + ,4.36 + ,4.15 + ,3.92 + ,3.88 + ,4.20 + ,3.95 + ,3.78 + ,3.69 + ,3.77 + ,3.66 + ,3.53 + ,3.50 + ,3.14 + ,3.42 + ,3.30 + ,2.81 + ,3.15 + ,3.37 + ,4.05 + ,4.00 + ,4.20 + ,4.21 + ,4.24 + ,4.24 + ,4.17 + ,4.12 + ,4.35 + ,3.98 + ,3.62 + ,4.39 + ,5.01 + ,4.07 + ,3.70 + ,3.59 + ,3.44 + ,3.33 + ,2.98 + ,3.14 + ,2.55 + ,2.49 + ,2.53 + ,2.43) > 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/1uj7b1354190072.tab") > postscript(file="/var/wessaorg/rcomp/tmp/2gz7k1354190072.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/2gz7k1354190072.ps tmp/2gz7k1354190072.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.922 0.178 1.079