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(88.1,101.7,114.8,103.4,96.4,110,71.1,79.4,119.2,99.1,113.2,103.6,97.5,102.4,120.8,89.5,101.7,112.5,72.4,84.7,117.2,112.8,111.3,102.3,95.2,103,116.4,95.1,100.7,112.4,75.3,93.3,118.6,118.7,110.7,113.3,89.5,106.3,115.1,105.7,95.8,114.7,79.6,80.6,125,127.5,99.5,104.3,90,96,108.9,95.8,87.2,108.4,74.9,80.8,119.1,107.9,106.9,96.8,93.7,95.2,112.7,98.5,91.5,112,76.7,84.7,114.9,108.4,104.6,111.3,90.8,109.1,121,95.2,110.5,102.4,86.7,99.1,126,110.3,104.6,103.1,102) > par1 = '12' > par1 <- as.numeric(par1) > n <- length(x) > sx <- sort(x) > > #Note: the /var/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/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(x,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/fisher/rcomp/tmp/1rgbu1354445537.tab") > > > > proc.time() user system elapsed 0.297 0.086 0.355