R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-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.3,8.2,8.1,8,8.1,8.1,8,7.8,7.7,7.7,7.7,7.6,7.5,7.3,7.2,7.1,7.2,7.2,7.2,6.9,6.8,6.8,6.8,6.9,7,7.2,7.2,7.2,7,7,7.2,7.4,7.8,8,7.8,7.8,7.9,7.9,8,8,8,8,8.2,8.4,8.6,8.6,8.5,8.5,8.4,8.4,8.4,8.5,8.6,8.6,8.6,8.6,8.6,8.5,8.4,8.4,8.3,8.3,8.3,8.6,8.8,8.8,8.5,8.1,7.9,8,8.4,8.5,8.5,8.4,8.3,8.3,8.2,8.1,8.1,8.2,8.2,8.2,8.1,8.1,8,7.8,7.7,7.7,7.7,7.7,7.7,7.5,7.4,7.3,7.4,7.4,7.3,7.3,7.1,7,6.5,6.3,6.3,6.5,6.6,6.5,6.3,6.3,6.3,6.5,6.7,6.7,6.7,6.8,6.7,6.8,6.8,7,7,7.2,7.4,7.6,7.8,7.9,8.1,8.3,8.5,8.7,8.8,8.9,9,9,9.1,9.1,9.1,9.2,9.4,9.4,9.3,9.4,9.4,9.5,9.5,9.4,9.4,9.4,9.3,9.3,9.3,9.3,9.3,9.2,9.1,9.1,9.1,9.1,9.2,9.2,9.2,9.3,9.4,9.4,9.5,9.6,9.7,9.7,9.8,9.9,9.9,9.9,9.8,9.8,9.7,9.7,9.6,9.6,9.6,9.6,9.6,9.7,9.7,9.7,9.7,9.8,9.8,9.8,9.8,9.9,9.9,9.8,9.7,9.6,9.6,9.5,9.3,9.2,9,8.9,8.7,8.5,8.4,8.2,8.1,7.9,7.8,7.6,7.5,7.4,7.2,7.2,7.1,7,7,6.9,6.8,6.7,6.7,6.6,6.6,6.5,6.5,6.4,6.4,6.4,6.4,6.3,6.4,6.4,6.4,6.4,6.4,6.4,6.4,6.5,6.5,6.6,6.6,6.6,6.7,6.7,6.8) > par1 = '12' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, 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: > #Technical description: > par1 <- as.numeric(par1) > n <- length(x) > sx <- sort(x) > > #Note: the /var/www/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/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/www/rcomp/tmp/11s9s1293458051.tab") > postscript(file="/var/www/rcomp/tmp/21s9s1293458051.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/21s9s1293458051.ps tmp/21s9s1293458051.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.500 0.220 0.689