I know that gsem allows only the logit link for the multinomial response variable, but instead of mlogit, a part of my structural equation model needs a mprobit, so I wonder if it's possible to trick gsem to fit a mprobit model.
To see if it's possible to do so, I try to use gsem to replicate the example in the mprobit help file. As can be seen from the code and output below, I fail, so I'm here to seek your advice and help. Do I mess up any model specification?
Code:
webuse sysdsn1, clear
//#The mprobit to be replicated:
mprobit insure age male nonwhite i.site, baseoutcome(3)
estimate store Mprobit
keep if e(sample)
ge insure1 =insure==1 if insure !=. & insure!=2
ge insure2 =insure==2 if insure !=. & insure!=1
//#Try to replicate mprobit using gsem below:
gsem (insure1 <- age male nonwhite i.site L1@1, probit) ///
(insure2 <- age male nonwhite i.site L1@1, probit), ///
var(L1@1) means(L1@0)
estimate store GsemMprobit
estimate table Mprobit GsemMprobit, equations(1:1, 2:2) stats(N ll)
----------------------------------------
Variable | Mprobit GsemMpro~t
-------------+--------------------------
#1 age | .00508145 .00267706
male | -.3332637 -.25006264
nonwhite | -.24858591 -.09825171
site 2 | .68994846 .82667674
3 | .17884471 .08275221
L1 | 1
_cons | .98559174 1.5189577
-------------+--------------------------
#2 age | -.00477215 -.00224479
male | .14420407 .02492026
nonwhite | .57591439 .48949647
site 2 | .78734408 .90338986
3 | -.31704734 -.26848647
L1 | 1
_cons | 1.2087417 1.5969324
-------------+--------------------------
var(L1)| 1
-------------+--------------------------
Statistics |
N | 615 615
ll | -534.52833 -204.97804
----------------------------------------Moreover, I also read the gsem manual (https://ift.tt/Zma5TDu), in case it's impossible to trick gsem to fit mprobit and I need to programme it by myself. I have two questions about the linear prediction:
1. as the quote below, why do the latent loadings Λi for an observed response variable yij form a matrix instead of a vector? (Note that yij is not a vector but a scalar.)
2. why is the vector of exogenous variables xj placed in the product of xj'Λiu? (u is a vector of latent variables.) I thought it should be just the product of the latent variables u and their regression coefficients (loadings Λi) for yij.
"[quote]----------------------------------------------------------------------------------------------------------------------------------
Array
----------------------------------------------------------------------------------------------------------------------------------[quote]"
Any comments and suggestions will be appreciated, and I hope the questions above do not violate any regulation of this forum. Thank you very much.
0 Response to Is it possible to fit a mprobit model using gsem
Post a Comment