--- [email protected] wrote to me privately:
> Second, your example helped me fix the problem, but I now have a
> question as to why it is fixed. To make my question clear, I will
> present it by adopting your example.
>
> The following code runs a logit with 100 IDENTICAL random samples
> (which was my original problem):
>
> gen bw = 1
> forvalues i = 1/100 {
> bsample, weight(bw)
> logit foreign rep78
> }
>
> But this code creates a new random sample with each iteration (and
> this random sample does not decrease in size with each iteration):
>
> gen bw = 1
> forvalues i = 1/100 {
> bsample, weight(bw)
> logit foreign rep78 [fw=bw]
> }
>
> As you can see, the only difference is the inclusion of [fw=bw] with
> the logit command. I know this specifies a frequency weighting for
> on each observation. However, it is not clear to me why this enables
> the bsample command to now pull a different sample with each
> iteration.
Regarding follow up questions off list, see point 5 in the Statalist
FAQ: http://www.stata.com/support/statalist/faq .
All that -bsample- changes when the -weight()- option is specified is
the weights: If an observations has not been drawn it receives weight
0, if it is selected once it receives weight 1, if it is selected twice
it receives weight 2, etc. So the original data is the data without
weighting, and the bootstrap sample is the the data when you weight.
--Maarten
-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands
visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434
+31 20 5986715
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
__________________________________________________________
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html
*
* 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/