search for: tlfk1fxrul

Displaying 1 result from an estimated 1 matches for "tlfk1fxrul".

2007 Oct 03
2
Sample selection problem
I want to get a sample of some arbitrary size from a population having only two values 0 and 1 with replacement, but with different probability for selection. For example 0 will be selected with probability 0.4 and 1 with 0.6. I could use sample function i.e. sample(c(0,1), 30, T) to get this, however here, selection of either 0 or 1 has equal probability here. I am looking for a function which