[R] Re sampling from an ECDF

Spiderschwein martin_moeller at gmx.de
Thu Dec 4 16:20:03 CET 2008


Say F_n is my ecdf, generated from my sample x.
With sample(x, 2000, replace = TRUE) I get a uniformly distributed sample
from x.

But I need a (re)sample, which is F_n distributed.
Now I'm confused, if that makes a difference or not...

Regards,
Martin



Dimitris Rizopoulos-4 wrote:
> 
> say 'x' is your sample, then try
> 
> sample(x, 2000, replace = TRUE)
> 
> 
> I hope it helps.
> 
> Best,
> Dimitris
> -- 
> Dimitris Rizopoulos
> Assistant Professor
> Department of Biostatistics
> Erasmus Medical Center
> 
> Address: PO Box 2040, 3000 CA Rotterdam, the Netherlands
> Tel: +31/(0)10/7043478
> Fax: +31/(0)10/7043014
> 
> ______________________________________________
> R-help at 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.
> 
> 

-- 
View this message in context: http://www.nabble.com/Resampling-from-an-ECDF-tp20831433p20835550.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list