Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: st: RE: saving coefficient matrix for two models
From
Maarten buis <[email protected]>
To
[email protected]
Subject
Re: st: RE: saving coefficient matrix for two models
Date
Wed, 23 Feb 2011 08:23:35 +0000 (GMT)
--- On Wed, 23/2/11, Michael Palmer wrote:
> I'm estimating a two part model (first part logit, second
> part log linear model) and am calculating the marginal effects which
> require coefficients from both models. The question is how to save
> coefficients from the two consecutive models.
> For example..
>
> Logit hospital_visit $xlist
> Mfx
> Mat b = e(b)
>
> Reg Ln_hospital_expenditure $xlist
> Mat b = e(b)
>
> I presume 'display _b[age]' for example will give me the
> coefficient for second model but how to derive the same
> coefficient from the first model.
Your best chance is to use -suest-, as this will not only stack
the coefficient matrix but also creates a meaninigfull variance
covariance matrix for that stacked coefficient matrix. This
means that you can compute your marginal effect using -nlcom-,
which means you will also get standard errors for your marginal
effects.
Hope this helps,
Maarten
Ps. the term log linear model means different things in different disciplines. In my (sub-(sub-))discipline (sociology) it refers
to a type of ANOVA for discrete dependent variables, i.e. that
model is linear in the log odds and is related to -logit- just
as ANOVA is related to -regress-. So if you ever find yourself
talking about this model to a sociologist and you get the
impression that you two are not understanding each other, check
whether you are talking about the same model.
--------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://www.maartenbuis.nl
--------------------------
*
* 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/