[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

From |
"Laplante, Beno�t" <[email protected]> |

To |
<[email protected]> |

Subject |
RE: st: Storing results from replications |

Date |
Thu, 1 Sep 2005 16:03:34 -0400 |

```
I am stunned. When I sent that question, I was hoping for some help, but I had never envisioned that someone would take the time to do such a work.
I have to go to a meeting right now. I will test the brand new -bs4rw- that I just installed later tonight.
Thanks a million times to Jeff.
Beno�t Laplante, professeur
Universit� du Qu�bec
Institut National de la Recherche Scientifique
Urbanisation, Culture et Soci�t�
http://www.inrs-ucs.uquebec.ca/default.asp?p=lapl
-----Message d'origine-----
De�: [email protected] [mailto:[email protected]] De la part de Jeff Pitblado, StataCorp LP
Envoy�: 1 septembre, 2005 15:19
��: [email protected]
Objet�: Re: st: {Spam?} Storing results from replications
Benoit Laplante <[email protected]> has bootstrap replicate weight
variables and asks how to generate a dataset for use with -bstat-:
> I use data from complex surveys that are distributed with bootstrap weights
> (actually, mean bootstrap weights, but this is not the issue).
>
> In need to compute a variance matrix based on the deviation from the
> averaged bootstrap coefficients. Given that I do not know the averaged
> coefficients until I have performed all the relevant replications, I cannot
> accumulate variance. Thus I need to store the elements of the numerous e(b)
> somewhere until I process them with -bstat- or something similar.
>
> The number of elements of e(b) as well as the column names differ for each
> analysis.
>
> The number of covariates may reach a few dozens and the number of
> replications may reach 1000. Given the size, appending each e(b) in a matrix
> does not seem to be a workable solution.
>
> -post- requires expressions enclosed in parentheses. I can extract the
> column names from e(b), but I cannot see how to turn the content of e(b)
> into anything palatable for -post-.
When I first read this email, I wrote an example do-file to illustrate how to
use -post- with some new "undocumented" Stata 9 programmer tools (see -help
_prefix-). Just before I send the reply out, I decided it would be better if
I just wrote an UNofficial version of -bootstrap- that took replicate weight
variables instead of using -bsample- to generate the bootstrap replicates.
The UNofficial prefix command is -bs4rw-. Those interested in testing it out
can download it from my user site at stata.com:
. net from http://www.stata.com/users/jpitblado
. net d bs4rw
. net install bs4rw
I've written a short certification script for -bs4rw-. It merely verifies
that -bs4rw- can reproduce the -e(V)- from -bootstrap- when given the
appropriate replicate weight variables (assuming a given seed). This
certification script can also be downloaded:
. net get bs4rw
I've only just started looking into the survey literature regarding the
Bootstrap, so I'm not sure how useful -bs4rw- will be for different methods
that generate bootstrap replicate weight variables. The idea behind -bs4rw-
is to call the prefixed command using each supplied replicate weight variable,
save the point estimates to a (temporary) data file, then use the standard
formulas (see [R] bootstrap) for computing the variance matrix.
--Jeff
[email protected]
*
* 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/
*
* 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/
```

- Prev by Date:
**Re: st: {Spam?} Storing results from replications** - Next by Date:
**st: Calculating the e^b using listcoef** - Previous by thread:
**Re: st: {Spam?} Storing results from replications** - Next by thread:
**st: Calculating the e^b using listcoef** - Index(es):

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