Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: problems with bootstrap

Subject   st: problems with bootstrap
Date   Tue, 25 Nov 2003 17:45:58 +0000

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?

Dave Hogberg
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index