[R] Memory Problems with a Simple Bootstrap - Part II

Tom La Bone booboo at gforcecable.com
Sat Aug 2 12:46:13 CEST 2008


I have distilled my bootstrap problem down to this bit of code, which
calculates an estimate of the 95th percentile of 7500 random numbers drawn
from a standard normal distribution: 

library(boot)
per95 <- function( annual.data, b.index) {
  sample.data <- annual.data[b.index]
  return(quantile(sample.data,probs=c(0.95))) }
m <- 10000
x <- rnorm(7500,0,1)
B <- boot(data=x,statistic=per95,R=m)

Error: cannot allocate vector of size 286.1 Mb

This was result was observed with R 2.7.1 and 2.7.1patched when run on a
Windows XP computer with 4Gb of memory.

This does not seem to be an excessively large and complicated calculation,
so is this an intentional limitation of the boot function, a result of bad
choices on my part, or a bug? 

Tom





-- 
View this message in context: http://www.nabble.com/Memory-Problems-with-a-Simple-Bootstrap---Part-II-tp18788083p18788083.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list