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: margin and gsem
From
Klaus Pforr <[email protected]>
To
[email protected]
Subject
Re: st: margin and gsem
Date
Tue, 27 Aug 2013 10:18:34 +0200
Thank you very much for clearing that up!
Klaus
Am 26.08.2013 23:31, schrieb Jeff Pitblado, StataCorp LP:
Klaus Pforr <[email protected]> is using -margins- after -gsem-, but
-margins- is not returning estimable results when it should:
I used some of the examples and tried to estimate margins of responses
and marginal effects. So far I could not manage to get estimate from
margin with any of the gsem examples.
I'm especially interested in multilevel mlogit models. I am fully
aware of the problems with the random part with this problem, but the
predict(fixedonly) option did not help in any way.
Just to give an idea, what I am talking about, I put in some examples:
* This is an mlogit. The problem does not change, when you run a logit
on only two outcomes
use http://www.stata-press.com/data/r13/gsem_lineup
gsem (i.chosen <- i.location i.suswhite i.witmale i.violent
M1[suspect]@1), mlogit
margin, predict(mu fixedonly)
margin, dydx(*) predict(mu fixedonly)
* This is a linear model. The problem does not change, when you break
the continous variable in
* groups and run logit or mlogit
use "http://www.stata-press.com/data/r13/gsem_fifeschool", clear
gsem (attain <- vrq i.sex M1[pid] M2[sid]),
margin, predict(mu fixedonly)
margin, dydx(*) predict(mu fixedonly)
Has anyone worked with an gsem example, in which margins worked?
Klaus has found a bug in how -margins- handles -gsem- results containing
multilevel latent variables.
-margins- is mistakenly treating multilevel latent variables (e.g.
M1[suspect]) as intercepts, which is causing it to fail the estimable
functions test.
The fix for this should be available in the next update to Stata 13.
--Jeff
[email protected]
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/
--
__________________________________
Dr. Klaus Pforr
GESIS -- Leibniz Institut für Sozialwissenschaft
B2,1
Postfach 122155
D - 68072 Mannheim
Tel: +49 621 1246 298
Fax: +49 621 1246 100
E-Mail: [email protected]
__________________________________
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/faqs/resources/statalist-faq/
* http://www.ats.ucla.edu/stat/stata/