Hi I am running a multilevel multinomial model where the effect is assumed to be equal across the outcome categories. I see that changing the reference category in the outcome variable affects the variance estimate of the random effect? I expected that the variance should have stayed unchanged because the underlying random effects structure, including the variance of these effects, is not directly related to how the outcome categories are coded. Here is an example using the Stata Example 41g.
You see the variance estimates change from
to
and
as the reference category changes from 1 to 2 and to 3. Is this something expected especially given it is a model with shared random effects? Does it have something to do with the assumption that changing the reference category of the outcome variable implies dropping the reference category from the model (i.e., the variance estimate is only for the two categories included in the model )? In such case how do you conclude about the effect size due to the change in standard deviation of the random effect (sqrt(0.254) is bigger than sqrt(0.068)?.
Thank you for your input.
Code:
use https://www.stata-press.com/data/r18/gsem_lineup, clear (Fictional suspect identification data) . gsem (ib1.chosen <- i.location i.suswhite i.witmale i.violent M1[suspect]@1),mlogit Fitting fixed-effects model: Iteration 0: Log likelihood = -6914.9098 Iteration 1: Log likelihood = -6696.7136 Iteration 2: Log likelihood = -6694.0006 Iteration 3: Log likelihood = -6693.9974 Iteration 4: Log likelihood = -6693.9974 Refining starting values: Grid node 0: Log likelihood = -6705.0919 Fitting full model: Iteration 0: Log likelihood = -6705.0919 (not concave) Iteration 1: Log likelihood = -6654.5724 Iteration 2: Log likelihood = -6653.5717 Iteration 3: Log likelihood = -6653.5671 Iteration 4: Log likelihood = -6653.5671 Generalized structural equation model Number of obs = 6,535 Response: chosen Base outcome: 1 Family: Multinomial Link: Logit Log likelihood = -6653.5671 ( 1) [2.chosen]M1[suspect] = 1 ( 2) [3.chosen]M1[suspect] = 1 ---------------------------------------------------------------------------------- | Coefficient Std. err. z P>|z| [95% conf. interval] -----------------+---------------------------------------------------------------- 1.chosen | (base outcome) -----------------+---------------------------------------------------------------- 2.chosen | location | Suite_1 | .3867066 .1027161 3.76 0.000 .1853868 .5880264 Suite_2 | .4915675 .0980312 5.01 0.000 .2994299 .6837051 | 1.suswhite | -.0275501 .0751664 -0.37 0.714 -.1748736 .1197734 1.witmale | -.0001844 .0680803 -0.00 0.998 -.1336193 .1332505 1.violent | .0356477 .0773658 0.46 0.645 -.1159864 .1872819 | M1[suspect] | 1 (constrained) | _cons | -1.002334 .099323 -10.09 0.000 -1.197003 -.8076643 -----------------+---------------------------------------------------------------- 3.chosen | location | Suite_1 | -.2832042 .0936358 -3.02 0.002 -.4667271 -.0996814 Suite_2 | .1391796 .0863473 1.61 0.107 -.0300581 .3084172 | 1.suswhite | -.2397561 .0643075 -3.73 0.000 -.3657965 -.1137158 1.witmale | .1419285 .059316 2.39 0.017 .0256712 .2581857 1.violent | -1.376579 .0885126 -15.55 0.000 -1.55006 -1.203097 | M1[suspect] | 1 (constrained) | _cons | .1781047 .0833393 2.14 0.033 .0147627 .3414468 -----------------+---------------------------------------------------------------- var(M1[suspect])| .2538014 .0427302 .1824673 .3530228 ---------------------------------------------------------------------------------- . gsem (ib2.chosen <- i.location i.suswhite i.witmale i.violent M1[suspect]@1),mlogit Fitting fixed-effects model: Iteration 0: Log likelihood = -6914.9098 Iteration 1: Log likelihood = -6696.7136 Iteration 2: Log likelihood = -6694.0006 Iteration 3: Log likelihood = -6693.9974 Iteration 4: Log likelihood = -6693.9974 Refining starting values: Grid node 0: Log likelihood = -6769.1458 Fitting full model: Iteration 0: Log likelihood = -6769.1458 (not concave) Iteration 1: Log likelihood = -6698.9501 Iteration 2: Log likelihood = -6691.9396 Iteration 3: Log likelihood = -6691.8455 Iteration 4: Log likelihood = -6691.8454 Generalized structural equation model Number of obs = 6,535 Response: chosen Base outcome: 2 Family: Multinomial Link: Logit Log likelihood = -6691.8454 ( 1) [1.chosen]M1[suspect] = 1 ( 2) [3.chosen]M1[suspect] = 1 ---------------------------------------------------------------------------------- | Coefficient Std. err. z P>|z| [95% conf. interval] -----------------+---------------------------------------------------------------- 1.chosen | location | Suite_1 | -.4046607 .090224 -4.49 0.000 -.5814966 -.2278249 Suite_2 | -.4807425 .086508 -5.56 0.000 -.6502951 -.3111899 | 1.suswhite | .0122528 .0738115 0.17 0.868 -.1324151 .1569207 1.witmale | .0046052 .0668948 0.07 0.945 -.1265061 .1357166 1.violent | -.0697393 .0756255 -0.92 0.356 -.2179626 .078484 | M1[suspect] | 1 (constrained) | _cons | 1.050988 .093792 11.21 0.000 .8671586 1.234817 -----------------+---------------------------------------------------------------- 2.chosen | (base outcome) -----------------+---------------------------------------------------------------- 3.chosen | location | Suite_1 | -.6720046 .0957872 -7.02 0.000 -.8597441 -.4842652 Suite_2 | -.3602381 .0888463 -4.05 0.000 -.5343736 -.1861025 | 1.suswhite | -.2113822 .0762218 -2.77 0.006 -.3607741 -.0619902 1.witmale | .1427508 .0700491 2.04 0.042 .0054571 .2800445 1.violent | -1.418136 .0972193 -14.59 0.000 -1.608682 -1.22759 | M1[suspect] | 1 (constrained) | _cons | 1.200875 .0959175 12.52 0.000 1.01288 1.388869 -----------------+---------------------------------------------------------------- var(M1[suspect])| .0680095 .0366291 .0236659 .1954412 ---------------------------------------------------------------------------------- . gsem (ib3.chosen <- i.location i.suswhite i.witmale i.violent M1[suspect]@1),mlogit Fitting fixed-effects model: Iteration 0: Log likelihood = -6914.9098 Iteration 1: Log likelihood = -6696.7136 Iteration 2: Log likelihood = -6694.0006 Iteration 3: Log likelihood = -6693.9974 Iteration 4: Log likelihood = -6693.9974 Refining starting values: Grid node 0: Log likelihood = -6745.852 Fitting full model: Iteration 0: Log likelihood = -6745.852 (not concave) Iteration 1: Log likelihood = -6680.816 Iteration 2: Log likelihood = -6678.6144 Iteration 3: Log likelihood = -6677.3669 Iteration 4: Log likelihood = -6677.3577 Iteration 5: Log likelihood = -6677.3577 Generalized structural equation model Number of obs = 6,535 Response: chosen Base outcome: 3 Family: Multinomial Link: Logit Log likelihood = -6677.3577 ( 1) [1.chosen]M1[suspect] = 1 ( 2) [2.chosen]M1[suspect] = 1 ---------------------------------------------------------------------------------- | Coefficient Std. err. z P>|z| [95% conf. interval] -----------------+---------------------------------------------------------------- 1.chosen | location | Suite_1 | .2910483 .0874102 3.33 0.001 .1197274 .4623692 Suite_2 | -.1175012 .0800743 -1.47 0.142 -.2744438 .0394415 | 1.suswhite | .2381603 .0636875 3.74 0.000 .1133352 .3629855 1.witmale | -.1319328 .0587295 -2.25 0.025 -.2470404 -.0168252 1.violent | 1.381567 .088094 15.68 0.000 1.208906 1.554228 | M1[suspect] | 1 (constrained) | _cons | -.149959 .0795696 -1.88 0.059 -.3059126 .0059947 -----------------+---------------------------------------------------------------- 2.chosen | location | Suite_1 | .6910407 .1023064 6.75 0.000 .4905239 .8915576 Suite_2 | .3535532 .094723 3.73 0.000 .1678995 .5392069 | 1.suswhite | .2252813 .0769533 2.93 0.003 .0744556 .3761071 1.witmale | -.142911 .0706668 -2.02 0.043 -.2814154 -.0044067 1.violent | 1.444709 .0982176 14.71 0.000 1.252206 1.637212 | M1[suspect] | 1 (constrained) | _cons | -1.174468 .098238 -11.96 0.000 -1.367011 -.981925 -----------------+---------------------------------------------------------------- 3.chosen | (base outcome) -----------------+---------------------------------------------------------------- var(M1[suspect])| .1614845 .0373815 .1025863 .2541981 ----------------------------------------------------------------------------------
Code:
var(M1[suspect])| .2538014
Code:
var(M1[suspect])| .0680095
Code:
var(M1[suspect])| .1614845
Thank you for your input.