Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
input x prob
gen int fw = 100000*prob
bsample 10000, weight(fw)
tab x if fw>0
It would be handy if can have this in a single command, say something
-sample(x=1:5, N=10000, prob=(0.2,0.1,0.3,0.3,0.1), replace=TRUE)- for
general use purpose.
* For searches and help try: