I am trying to run a two-level multinomial random-intercept model that
includes level-2 covariates.
What I have is a dependent variable Y which takes 3 nominal values and
X1 & X2 are level-1 control variables and Z1 & Z2 are level-2
variables where the intercept is a function of Z1 and Z2. AREA is a
geographical identification variable.
I am wondering if anyone can evaluate the following gllamm syntax. In
particular, I am not quite sure if coefficients on Z1 and Z2 really
represents effects of Z1 and Z2 on latent variable (intercept).
Any comments will be greatly appreciated.
-----
sort AREA X1 X2 Y Z1 Z2
gen patt=_n
expand 3
sprt patt
qui by patt: gen dep=_n
gen chosen=dep==Y
sort patt dep
tab dep, gen(a)
gen a2_X1=a2*X1
gen a3_X1=a3*X1
gen a2_X2=a2*X2
gen a3_X2=a3*X2
gen a2_Z1=a2*Z1
gen a3_Z1=a3*Z1
gen a2_Z2=a2*Z2
gen a3_Z2=a3*Z2