R version 2.11.1 (2010-05-31) Copyright (C) 2010 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(14.267 + ,472.071 + ,12.335 + ,16.434 + ,10.132 + ,37.190 + ,27.169 + ,21.389 + ,17.416 + ,9.862 + ,8.326 + ,17.578 + ,26.242 + ,20.290 + ,8.089 + ,24.421 + ,9.155 + ,18.061 + ,14.693 + ,8.034 + ,19.516 + ,33.256 + ,17.737 + ,8.886 + ,12.187 + ,18.837 + ,12.341 + ,21.003 + ,18.421 + ,14.225 + ,10.730 + ,14.558 + ,20.347 + ,16.235 + ,39.199 + ,33.492 + ,79.503 + ,21.210 + ,15.907 + ,16.399 + ,7.887 + ,19.976 + ,23.664 + ,12.518 + ,2.385 + ,20.643 + ,16.756 + ,8.932 + ,36.014 + ,10.815 + ,26.268 + ,8.534 + ,14.107 + ,19.193 + ,9.594 + ,18.053 + ,15.805 + ,9.578 + ,8.321 + ,33.400 + ,11.547 + ,12.677 + ,14.138 + ,10.545 + ,10.982 + ,40.070 + ,7.399 + ,10.250 + ,23.433 + ,15.080 + ,29.558 + ,23.587 + ,2.093 + ,39.654 + ,8.285 + ,8.931 + ,34.526 + ,35.350 + ,6.566 + ,10.244 + ,11.090 + ,8.969 + ,12.206 + ,17.525 + ,12.953 + ,18.466 + ,15.110 + ,12.575 + ,24.394 + ,4.401 + ,31.119 + ,11.201 + ,14.781 + ,38.557 + ,29.500 + ,21.700 + ,10.934 + ,4.893 + ,13.080 + ,4.721 + ,18.021 + ,14.916 + ,13.534 + ,8.747 + ,12.229 + ,28.129 + ,9.647 + ,5.915 + ,9.435 + ,9.280 + ,11.673 + ,7.538 + ,23.025 + ,5.837 + ,13.894 + ,19.563 + ,6.356 + ,9.460 + ,9.300 + ,12.637 + ,7.587 + ,18.662 + ,15.058 + ,92.704 + ,13.784 + ,10.937 + ,15.290 + ,20.969 + ,32.207 + ,14.050 + ,8.048 + ,7.049 + ,22.317 + ,10.219 + ,5.246 + ,14.806 + ,18.450 + ,117.073 + ,10.875 + ,13.675 + ,22.111 + ,19.755 + ,22.060 + ,2.768 + ,34.026 + ,15.998 + ,9.307 + ,8.342 + ,12.019 + ,3.346 + ,34.812 + ,997 + ,19.837 + ,17.775 + ,12.092 + ,8.167 + ,7.792 + ,3.672 + ,14.116 + ,9.597 + ,11.283 + ,26.328 + ,73.941 + ,12.649 + ,5.467 + ,32.450 + ,35.963 + ,30.930 + ,23.898 + ,2.050 + ,15.578 + ,11.384 + ,13.574 + ,18.378 + ,69.175 + ,8.955 + ,12.243 + ,9.928 + ,10.620 + ,26.781 + ,9.371 + ,8.489 + ,10.840 + ,56.547 + ,11.040 + ,8.223 + ,11.031 + ,7.502 + ,6.586 + ,5.128 + ,19.474 + ,9.093 + ,13.461 + ,9.086 + ,4.963 + ,10.285 + ,21.515 + ,11.062 + ,11.748 + ,78.271 + ,17.937 + ,31.667 + ,17.528 + ,16.999 + ,17.473 + ,36.219 + ,9.534 + ,24.660 + ,19.201 + ,14.452 + ,13.973 + ,43.618 + ,23.547 + ,11.851 + ,17.651 + ,10.312 + ,23.414 + ,11.063 + ,20.457 + ,13.637 + ,19.825 + ,6.171 + ,22.397 + ,6.592 + ,12.242 + ,19.028 + ,28.799 + ,10.251 + ,17.451 + ,32.545 + ,12.226 + ,237.250 + ,7.999 + ,20.734 + ,9.418 + ,10.710 + ,22.705 + ,5.942 + ,11.080 + ,11.431 + ,13.241 + ,8.251 + ,7.776 + ,7.026 + ,8.033 + ,14.713 + ,8.148 + ,29.050 + ,24.639 + ,6.953 + ,13.881 + ,6.382 + ,6.135 + ,2.073 + ,6.475 + ,6.446 + ,7.919 + ,45.887 + ,15.489 + ,38.489 + ,18.387 + ,70.450 + ,17.096 + ,27.285 + ,7.605 + ,41.984 + ,18.001 + ,64.294 + ,7.966 + ,8.812 + ,71.543 + ,11.958 + ,14.636 + ,14.007 + ,6.707 + ,9.807 + ,38.828 + ,17.228 + ,20.306 + ,6.985 + ,9.974 + ,31.278 + ,12.561 + ,14.774 + ,12.118 + ,32.424 + ,24.139 + ,16.247 + ,13.719 + ,15.996 + ,13.898 + ,11.612 + ,29.993 + ,12.664 + ,19.296 + ,11.153 + ,30.384 + ,10.339 + ,6.898 + ,84 + ,9.412 + ,8.151 + ,24.935 + ,16.145 + ,29.859 + ,7.102 + ,36.661 + ,4.207) > par2 = '12' > par1 = '500' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Prof. Dr. P. Wessa > #To cite this work: AUTHOR(S), (YEAR), 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: Office for Research, Development, and Education > #Technical description: Write here your technical program description (don't use hard returns!) > par1 <- as.numeric(par1) > par2 <- as.numeric(par2) > if (par1 < 10) par1 = 10 > if (par1 > 5000) par1 = 5000 > if (par2 < 3) par2 = 3 > if (par2 > length(x)) par2 = length(x) > library(lattice) > library(boot) Attaching package: 'boot' The following object(s) are masked from 'package:lattice': melanoma > boot.stat <- function(s) + { + s.mean <- mean(s) + s.median <- median(s) + s.midrange <- (max(s) + min(s)) / 2 + c(s.mean, s.median, s.midrange) + } > (r <- tsboot(x, boot.stat, R=par1, l=12, sim='fixed')) BLOCK BOOTSTRAP FOR TIME SERIES Fixed Block Length of 12 Call: tsboot(tseries = x, statistic = boot.stat, R = par1, l = 12, sim = "fixed") Bootstrap Statistics : original bias std. error t1* 23.51143 -0.08076259 3.3060914 t2* 13.99000 0.04302300 0.6784515 t3* 499.52500 -117.89267700 156.5890059 > postscript(file="/var/www/rcomp/tmp/1gmz31290782211.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(r$t[,1],type='p',ylab='simulated values',main='Simulation of Mean') > grid() > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/2gmz31290782211.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(r$t[,2],type='p',ylab='simulated values',main='Simulation of Median') > grid() > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/3gmz31290782211.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > plot(r$t[,3],type='p',ylab='simulated values',main='Simulation of Midrange') > grid() > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/4gmz31290782211.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~r$t[,1],col='black',main='Density Plot',xlab='mean') > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/59dy61290782211.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~r$t[,2],col='black',main='Density Plot',xlab='median') > dev.off() null device 1 > postscript(file="/var/www/rcomp/tmp/69dy61290782211.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > densityplot(~r$t[,3],col='black',main='Density Plot',xlab='midrange') > dev.off() null device 1 > z <- data.frame(cbind(r$t[,1],r$t[,2],r$t[,3])) Warning message: In data.row.names(row.names, rowsi, i) : some row.names duplicated: 2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271 [... truncated] > colnames(z) <- list('mean','median','midrange') > postscript(file="/var/www/rcomp/tmp/79dy61290782211.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > boxplot(z,notch=TRUE,ylab='simulated values',main='Bootstrap Simulation - Central Tendency') Warning message: In bxp(list(stats = c(17.1726331168831, 20.8420876623377, 23.0434512987013, : some notches went outside hinges ('box'): maybe set notch=FALSE > grid() > dev.off() null device 1 > > #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,'Estimation Results of Blocked Bootstrap',6,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'statistic',header=TRUE) > a<-table.element(a,'Q1',header=TRUE) > a<-table.element(a,'Estimate',header=TRUE) > a<-table.element(a,'Q3',header=TRUE) > a<-table.element(a,'S.D.',header=TRUE) > a<-table.element(a,'IQR',header=TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'mean',header=TRUE) > q1 <- quantile(r$t[,1],0.25)[[1]] > q3 <- quantile(r$t[,1],0.75)[[1]] > a<-table.element(a,q1) > a<-table.element(a,r$t0[1]) > a<-table.element(a,q3) > a<-table.element(a,sqrt(var(r$t[,1]))) > a<-table.element(a,q3-q1) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'median',header=TRUE) > q1 <- quantile(r$t[,2],0.25)[[1]] > q3 <- quantile(r$t[,2],0.75)[[1]] > a<-table.element(a,q1) > a<-table.element(a,r$t0[2]) > a<-table.element(a,q3) > a<-table.element(a,sqrt(var(r$t[,2]))) > a<-table.element(a,q3-q1) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'midrange',header=TRUE) > q1 <- quantile(r$t[,3],0.25)[[1]] > q3 <- quantile(r$t[,3],0.75)[[1]] > a<-table.element(a,q1) > a<-table.element(a,r$t0[3]) > a<-table.element(a,q3) > a<-table.element(a,sqrt(var(r$t[,3]))) > a<-table.element(a,q3-q1) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/rcomp/tmp/8xwdi1290782211.tab") > > try(system("convert tmp/1gmz31290782211.ps tmp/1gmz31290782211.png",intern=TRUE)) character(0) > try(system("convert tmp/2gmz31290782211.ps tmp/2gmz31290782211.png",intern=TRUE)) character(0) > try(system("convert tmp/3gmz31290782211.ps tmp/3gmz31290782211.png",intern=TRUE)) character(0) > try(system("convert tmp/4gmz31290782211.ps tmp/4gmz31290782211.png",intern=TRUE)) character(0) > try(system("convert tmp/59dy61290782211.ps tmp/59dy61290782211.png",intern=TRUE)) character(0) > try(system("convert tmp/69dy61290782211.ps tmp/69dy61290782211.png",intern=TRUE)) character(0) > try(system("convert tmp/79dy61290782211.ps tmp/79dy61290782211.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 3.430 0.800 4.189