I am running a multilevel multinomial logit model
Code 1: gsem (i.o1<- v1 v2 v3 c1 c2 M1[g1]@1), mlogit
where vn are categorical/dummy variables, cn are continuous variables, g1 is the group level, and o1 is the dependent variable.
I have have no problem with this but I want to run a margins predict command. I cannot make margins and gsem work together.
When I run the model without the constraining group level variables (code 4) by the group i (logically) get the same results as using a mlogit command (code 2). When I use margins (code 3) after mlogit command (code 2) I get results however when i use margins (code 3) after gsem (either code 4 or code 1) it runs for at least a whole weekend without showing any output. This is despite the fact that mlogit (code 2) and and unconstrained gsem (code 4) give the same results.
Can margins/predict be used after gsem, mlogit? (Or have I massively over complicated this and am doing something simple wrong?)
Code 2: mlogit o1 i.v1 i.v2 i.v3 c1 c2
Code 3: margins v1 v2 v3, at(c1=(#)c2=(#)) predict(outcome(1.o1)
[result]
Code 4: gsem (i.o1<- v1 v2 v3 c1 c2), mlogit
Code 3: margins v1 v2 v3, at(c1=(#)c2=(#)) predict(outcome(1.o1)
[nothing, no error message, just runs for ever]
Any help would be very appreciated, Thanks Patrick.
Related Posts with Using margins after gsem mlogit model.
Drop certain observation if certain criteria meets a condition (Panel data)Hello! I have a panel data which consists from the year 2010 to 2019 I want drop all the observatio…
save spssSomehow savespss is broken, random extra empty string variables are added to the file produced, like…
How to export CSV with multiine text dataI have a CSV file in which some of the columns contain multiline text data. See below. Sample file a…
Question Stata!!Hello, Do you have any idea of how can I create a variable that is equal to the nº of years a perso…
Quadrivariate probit with endogenous dummy variable in the covariatesI am trying to identify the role played by marijuana in the consumption of hard drugs (cocaine, meth…
Subscribe to:
Post Comments (Atom)
0 Response to Using margins after gsem mlogit model.
Post a Comment