Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Question about fixed slope in GSEM Multinomial mixed model

    Dear,

    My question is about a multinomial multilevel regression analysis using gsem (mlogit). We have a model consisting of 3 levels (country, country + year, individual case), which should have a random intercept and fixed slope for country (highest level) and country + year (lower level). The dependent variable has three possible outcomes, of which 0 is the reference category. The other values are 1 and 2.

    Model (model 1)
    Code:
    gsem (i.uitstroombinnentweejaartot_nom <- i.year c.leeftijd_beslissing1 c.leeftijd_sq c.doorlooptijd_nieuw2 sq_proc_duur native_counselor i.family_composition opvangcap_2log i.urbanisation lnGDP_cap_PPP2 GDP_growth freedom_PTaveragemin1 freedom_PTaverageverschil CorruptionPerceptionIndex i.EUvisa i.potentialEUMember i.schengenvisarequired M1[Number] M2[Number>countryyear]), nocapslatent difficult latent(M1 M2) mlogit
    In the output, I see that the coefficients for variables M1[Number] and M2[Number>countryyear] are both constrained to 1 for outcome category 1. For outcome category 2 however, these variables have calculated coefficients. I would have expected that these two coefficients would also be constrained (see two screenshots below).
    Click image for larger version

Name:	Screenshot 2023-09-06 100817.png
Views:	1
Size:	4.0 KB
ID:	1726165

    Click image for larger version

Name:	Screenshot 2023-09-06 100854.png
Views:	1
Size:	6.4 KB
ID:	1726166




    I came across syntax to constrain coefficients (the character '@' with a suffix indicating the value of the coefficient) and ran a model with this syntax added. The result now shows a constrained coefficient for outcome category 2 as well.

    Model with syntax '@1' added to both M1 and M2 (model 2)
    Code:
    gsem (i.uitstroombinnentweejaartot_nom <- i.year c.leeftijd_beslissing1 c.leeftijd_sq c.doorlooptijd_nieuw2 sq_proc_duur native_counselor i.family_composition opvangcap_2log i.urbanisation lnGDP_cap_PPP2 GDP_growth freedom_PTaveragemin1 freedom_PTaverageverschil CorruptionPerceptionIndex i.EUvisa i.potentialEUMember i.schengenvisarequired M1[Number]@1 M2[Number>countryyear]@1), nocapslatent difficult latent(M1 M2) mlogit
    There are, however, some difference between the two models in the significance levels, value of the coefficients and in some cases even the direction of the correlation.

    My questions
    • Why is model 1 constraining the coefficients of variables M1[Number] and M2[Number>countryyear] only for outcome category 1 and not for outcome category 2?
    • Does model 2 contain a fixed slope, whereas model 1 contains a random slope for variables M1[Number] and M2[Number>countryyear], or am I misinterpreting the output.
    • Does the syntax '@1' tell Stata to 'fix the slope', or is this (again) a misinterpretation on my part?
    Kind regards,
    Michael Sinnige
    Last edited by Michael Sinnige; 06 Sep 2023, 02:13.

  • #2
    Why is model 1 constraining the coefficients of variables M1[Number] and M2[Number>countryyear] only for outcome category 1 and not for outcome category 2?
    Because this is the default behavior of gsem for multinomial logistic models.

    Does model 2 contain a fixed slope, whereas model 1 contains a random slope for variables M1[Number] and M2[Number>countryyear], or am I misinterpreting the output.
    Neither of your models contain random slopes. They only have random (or varying) intercepts corresponding to Number and Number>countryyear. What is different about model 1 is that you are estimating two fixed parameters (maybe means?) in the equation for 1.uitstroombinnentweejaartot_nom corresponding for the two random intercepts. I honestly have am not sure what those estimates are for. I would not expect to see them.

    Does the syntax '@1' tell Stata to 'fix the slope', or is this (again) a misinterpretation on my part?
    The `@1' syntax is used to constrain the variances of the random intercepts to be the same for each level of the outcome (check that the variances for M1[Number] are equivalent for 1.uitstroombinnentweejaartot_nom and 2.uitstroombinnentweejaartot_nom. Those variances should *not* be the same as the 1.uitstroombinnentweejaartot_nom and 2.uitstroombinnentweejaartot_nom variances at M2[Number>countryyear]. If they are, then change the constant on M2[Number>countryyear] to another number.

    I would suggest you run a model that allows the random intercept variances for a given level to be different for the different levels of the outcome. You can use lrtest to see if this model is a better fit to the data than the more restrictive model that forces them to be the same (your model 2).

    Code:
    gsem (1.uitstroombinnentweejaartot_nom <- all_predictors M1[Number] M2[Number>countryyear]) ///
         (2.uitstroombinnentweejaartot_nom <- all_predictors M3[Number] M4[Number>countryyear]), ///
          nocapslatent difficult latent(M1 M2 M3 M4) mlogit
    I strongly suggest you read the PDF documentation for gsem, especially examples 37g, 38g, and 41g

    Comment

    Working...
    X