Hi Statalist.
I'm utilising the new fmm (finite mixture model) system to do some non-linear modeling of government accountability on human development.
my estimation equation looks approximately like this:
I want to visualise the marginal effect of x1, x2 and x3 in three different plots. I also estimate a normal regression (no finite mixture model) with the same equation and utilise this command to get the plots I need:
The documentation for the fmm command tells me to use the "predict(eta)" option like this, for my finite mixture model
This seems incredibly computationally intensive, and I don't know why. It also seems impossible to get estimates for anything but the first class.
I feel like there should be a "class()" option to the margins commands
Does anyone know how to obtain predictive margins for both classes?
Best regards, and thanks
Adam Hede
I'm utilising the new fmm (finite mixture model) system to do some non-linear modeling of government accountability on human development.
my estimation equation looks approximately like this:
Code:
fmm 2: regress y c.x1##c.x1##c.x1 c.x2##c.x2##c.x2 c.x3##c.x3##c.x3 z1 z2 z3 z4 i.country i.year
Code:
margins, at(x1=(-2.2(0.2)2.3)) atmeans marginsplot margins, at(x2=(-2.2(0.2)2.3)) atmeans marginsplot margins, at(x3=(-2.2(0.2)2.3)) atmeans marginsplot
Code:
margins, at(id1=(-2.2(0.2)2.3)) predict(eta)
I feel like there should be a "class()" option to the margins commands
Does anyone know how to obtain predictive margins for both classes?
Best regards, and thanks
Adam Hede
Comment