Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Bootstrapping a vector, no results?


From   Joerg Luedicke <joerg.luedicke@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Bootstrapping a vector, no results?
Date   Tue, 20 Mar 2012 06:48:54 -0700

I can only comment on the example from the Stata FAQ that you mention.
I ran it and I cannot see any problems: e(b) shows the point
estimates, e(V) the bootstrapped variance, and a(b_bs) the average of
bootstrapped point estimates. Also, version 11 vs 12 should not be an
issue here either. If you use 11.0, perhaps make sure to update to
11.2.

Joerg

On Tue, Mar 20, 2012 at 5:54 AM, mariaabreu <ma405@cam.ac.uk> wrote:
> Dear all,
>
> I am trying to bootstrap a vector of statistics generated by mvprobit, using
> my own user-written programme. To do this I am using the following code:
>
>
> capture program drop mymvprobit
> program define mymvprobit, eclass
>
> .... (several calculations resulting in row vector m_all...)
>
> ereturn post m_all
> ereturn local cmd="bootstrap"
>
> end
>
>
> clear all
> use fullsample.dta, clear
>
> bootstrap _b, reps(50): mymvprobit
>
>
> The programme above works and I get no error messages, the line with dots
> appears and gets to 50, but there are no bootstrap results, the programme
> just ends. This only happens with vector output. If I pass the statistics
> individually using an r-class command, I do get the bootstrap results.
>
> Even more strangely, I followed the advice in the Stata FAQ "How do I
> boostrap a vector of results", and have run the exact same code in that
> example:
>
> capture program drop myreg
>  program myreg, eclass
>        tempname bb
>        quietly regress mpg turn
>        matrix `bb'=e(b)
>        ereturn post `bb'
>        ereturn local cmd="bootstrap"
>
>  end
>
> clear
> sysuse auto
> set seed 12345
> bootstrap _b, reps(50) nowarn: myreg
>
> ...and the same thing happens, there are no bootstrap results. The line with
> dots appears and that is that. There is nothing stored in e(b_bs) etc. The
> only thing that is different is that the above code is written for Stata
> 12.0, while I am using Stata 11.0. Could that be the reason?
>
> Any help would be much appreciated! What am I missing?
>
>
>
>
>
> --
> View this message in context: http://statalist.1588530.n2.nabble.com/Bootstrapping-a-vector-no-results-tp7389028p7389028.html
> Sent from the Statalist mailing list archive at Nabble.com.
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index