Im currently trying to simulate both means and medians using bootstrap in
Stata version 7. I need to generate a distribution of simulated means and
medians. I am trying to generate these for a variable called �ployalty� which
has a range of 0-1. The cluster variable, �clstr�, has a range of 1-5. In
short, I am trying to generate means and medians using one observation from
each cluster.
Here is the code that I used to try to simulate the means:
bs �summarize ployal� �r(mean)�, reps (100) cluster (clster) saving (genmean)
However, the new file genmean.dta has the same value, .745, for all 100 of the
observations. What am I doing wrong?
Also, when I try to run the simulation for medians using the following code:
bs �summarize ployal� �r(mean)�, reps (100) cluster (clster) saving (genmed)
The only value returned is no value, i.e. �.� Any thoughts on what I�m doing
wrong here?
Thanks,
Dave Hogberg
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/