Statalist


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

Re: st: stata code for two-part model


From   "Eva Poen" <[email protected]>
To   [email protected]
Subject   Re: st: stata code for two-part model
Date   Sat, 16 Aug 2008 08:41:57 +0100

Shehzad,

this looks like a hurdle model. Have you search the ssc archives to
see if someone else has programmed it for you? Have a look at
-hplogit-, for example.

If you end up doing it yourself, I think you need to do a bit of
programming. In order for -mfx- to work after your estimation, you
need a way of telling it what you want the marginal effects to be
calculated for. In your case, this would be the overall expected cost
of care from your model. The way to feed this to -mfx- is via the
predict(predict_option), but for this to work you need to write a
-predict- command and an estimation command for your model.

See for example this post:
http://www.stata.com/statalist/archive/2005-10/msg00091.html

Hope this helps,
Eva



2008/8/16 Shehzad Ali <[email protected]>:
> Hi,
>
> I was wondering if someone can help with stata code for calculating marginal
> effects after two-part models for say, cost of care. Here, first part is a
> probit model for seeking care or not, and the second part is an OLS model of
> cost of care, conditional on decision to seek care. Here is the simplified
> code:
>
> probit care $xvar
>
> reg cost $zvar if care==1
>
> mfx
>
> I understand that mfx after the second part gives us the marginal effects
> for the OLS part only, and not the conditional marginal effects.
>
> Any help would be appreciated.
>
> Thanks,
>
> Shehzad
>
> Shehzad Ali
> Department of Social Policy & Social Work
> University of York
> Heslington
> YO10 5DD
>
> Tel: *44 (0) 773 813 0094
> Email: [email protected]
>
>
> *
> *   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index