[R] How to create strata out of the data.frame table

From: Ana Kolar <annakolar28_at_gmail.com>
Date: Wed, 18 Jun 2008 21:20:16 +0700


My data.frame table consist of 3 variables (x,y and z) where each variable has 1000 units. I need to create 5 equal size strata according to one of the variable (let's say x) whereas units of x variable with a higher value have higher probability to be selected in a strata with a higher number (max strata number is 5).

I've been trying different things so far and since I am fairly new to R i can't figure it out how to trick the R to produce me a table with those 5 strata containing values of my original data so that I could continue with a further analysis.

Please help me!

have tried Survival package (Stratified sampling) but it doesnt produce me results in the right way...i must have been doing sth wrong

        [[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 Wed 18 Jun 2008 - 15:46:24 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 Wed 18 Jun 2008 - 18:30:50 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