Bookmark and Share

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   "Michael Palmer" <Michael.Palmer@anu.edu.au>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: st: RE: saving coefficient matrix for two models
Date   Thu, 24 Feb 2011 11:00:12 +1100

Thanks Martin! Will investigate..  


Michael Palmer
PhD Candidate 
National Centre for Epidemiology and Population Health 
The Australian National University 
Ph. 6125 0538
M. 0437 867 940

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Maarten buis
Sent: Wednesday, 23 February 2011 7:24 PM
To: statalist@hsphsun2.harvard.edu
Subject: Re: st: RE: saving coefficient matrix for two models

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



*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index