Statalist The Stata Listserver


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

st: bootstrapping mvprobit


From   France Weaver <[email protected]>
To   [email protected]
Subject   st: bootstrapping mvprobit
Date   Thu, 31 Aug 2006 11:51:07 -0400

Dear Stata users (Sorry if you receive that message twice, I had trouble
sending it out...),

I am wondering if any of you has tried to bootstrap the mvprobit command? I
have created a small program (reported below) to get the confidence
intervals around predicted probabilities (mvppred command) from a
multivariate probit model (mvprobit command). I bootstrap that program but
it does not provide any confidence intervals. It looks as if it re-samples
always the same sample because all the iterations have the exact same
values... When I bootstrap a similar program for a probit or bivariate
probit model, I get confidence intervals... Can anyone help me?
Thank you very much,

France Weaver, Ph.D.

The bootstrap command I use is:

bootstrap p_all0=r(all0) p_all1=r(all1), reps(50) saving("s:\bs_mvp",
replace): marginal

The ado file I created is:

capture program drop marginal
program define marginal, rclass
     version 9.2

     gen deadnext_save=deadnext
     gen marrddn_save=marrddn

     mvprobit (fhmcare=$rhs)(reschddn=$exog_rhs $iv1)(reschild=$exog_rhs $iv1)

     replace deadnext=0
     replace marrddn=0

     mvppred xb
     gen p0=norm(xb1)
     drop xb*

     replace deadnext=1
     replace marrddn=married*deadnext

     mvppred xb
     gen p1=norm(xb1)
     drop xb*

     sum p0
     return scalar all0=r(mean)

     sum p1
     return scalar all1=r(mean)

     replace deadnext=deadnext_save
     replace marrddn=marrddn_save

end


*
*   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/



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