Re: [R] random sampling with levels and with replacement

From: taby gathoni <tabieg_at_yahoo.com>
Date: Fri, 08 Apr 2011 01:41:20 -0700 (PDT)

Thanks Daniel,
Its a long way but it will work.

From: Daniel Malter <daniel_at_umd.edu>
Subject: Re: [R] random sampling with levels and with replacement To: r-help_at_r-project.org
Date: Friday, April 8, 2011, 10:08 AM

If you want perfect equality, split the data in good and bad and sample from the two samples individually.

On average, however, random sampling from the entire data will reproduce the proportion of good and bad in the data.

hth,
Daniel

--
View this message in context: http://r.789695.n4.nabble.com/random-sampling-with-levels-and-with-replacement-tp3435494p3435592.html
Sent from the R help mailing list archive at Nabble.com.


______________________________________________
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. [[alternative HTML version deleted]]
______________________________________________
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.
Received on Fri 08 Apr 2011 - 10:53:54 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 08 Apr 2011 - 11:10:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive