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(99.4,102.7,109.3,93.9,95.3,101.8,85.6,81.1,109.5,104.0,94.5,79.0,92.8,95.6,101.7,90.8,89.5,91.8,83.8,77.4,112.7,98.8,85.7,72.8,96.9,95.0,94.2,87.3,80.6,87.9,79.6,71.9,94.6,91.4,86.6,68.5,90.1,91.6,95.4,85.4,81.6,88.9,84.1,74.7,97.1,95.3,85.1,67.3,80.6,87.9,89.2,81.3,79.7,83.7,82.1,69.3,91.2,85.7,85.2,70.0,85.8,91.4,97.5,87.1,85.1,94.1,85.8,74.7,99.9,90.7,86.8,74.8,91.8,97.6,100.8,85.4,84.0,90.6,80.5,73.9,93.6) > par1 = '12' > par1 <- as.numeric(par1) > n <- length(x) > sx <- sort(x) > > #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,'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/www/html/rcomp/tmp/1l1bc1260965898.tab") > > > > proc.time() user system elapsed 0.215 0.028 0.246