Try this:
maxreps=1000
my.medians=rep(NA,maxreps)
for(repnum in 1:maxreps){
my.sample=sample(my.distribution,length(my.distribution)/10) #change
sampling ratio if #desired
this.rep.median=median(my.sample)
my.medians[repnum]=this.rep.median
}
#Now, you can get CI two ways
#first, IF you are willing to assume a few things, the s.d. of your median
dist is the s.e. of #your estimate, the CI follows i.e. mean(my.medians)+-
2*sd(my.medians)
#OR,(Better), just quantile the interval out. i.e.for a 95% interval
lower=quantile(my.medians,.025)
upper=quantile(my.medians,.975)

This way, you can find the maxreps that are right for your machine.
                 Ken Hutchison

2011/12/20 Uwe Ligges <lig...@statistik.tu-dortmund.de>

>
>
> On 20.12.2011 06:47, Vikram Bahure wrote:
>
>> Dear R users,
>>
>> I am getting following error while using boot.ci. I have int.inc function
>> with 20000 values. I am generating CI for the sample estimate.
>>
>> *>    med<- function(x,i) median(x[i])*
>> *>    b1<- boot(int.inc,med,2)*
>> *>    ci.out<- boot.ci(b1,conf = c(0.95),type = c("bca"))*
>> *Error: cannot allocate vector of size 1.5 Gb*
>> *
>> *
>> It would be very helpful to get some insight on this.
>>
>
> Which more insight than the one that RAM available to R is not sufficient
> for such a memory intensive task?
>
> Uwe
>
>
>
>
>
>> Regards
>> Vikram
>>
>>        [[alternative HTML version deleted]]
>>
>> ______________________________**________________
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
>> PLEASE do read the posting guide http://www.R-project.org/**
>> posting-guide.html <http://www.R-project.org/posting-guide.html>
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
> ______________________________**________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
> PLEASE do read the posting guide http://www.R-project.org/**
> posting-guide.html <http://www.R-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to