Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

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

st: Bootstrapping a vector, no results?

From   mariaabreu <[email protected]>
To   [email protected]
Subject   st: Bootstrapping a vector, no results?
Date   Tue, 20 Mar 2012 05:54:00 -0700 (PDT)

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"


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

capture program drop myreg
 program myreg, eclass
	tempname bb
	quietly regress mpg turn
	matrix `bb'=e(b)
	ereturn post `bb'
	ereturn local cmd="bootstrap"

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:
Sent from the Statalist mailing list archive at
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index