Announcement

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

  • Random effects: logit with ibn. vs melogit

    I would like to model the predictors of remaining married (dichotomous) in a variety of countries (categorical "place", n=9). I would rather not have a base, since it doesn't make sense to compare all of the other countries to what happens in, say, Tanzania. My current model therefore uses the prefix "ibn.":
    Code:
    logit married i.age5 i.dur5 i.kid4 i.repcat i.edu3 husedyn twotypes ibn.place, noconstant nolog or
    I appreciate being able to follow this up with margins place and marginsplot so that I can make comparisons between countries. From other posts, I gather that I should interpret the output results from ibn.place as odds rather than odds ratios. Correct?

    Another option would be to use melogit to create a generalized linear mixed additive model. This increases complexity but could account for variability within countries. I'm seeing errors when I try the following:
    Code:
    melogit married i.age5 i.dur5 i.kid4 i.repcat i.edu3 husedyn twotypes || place: , noconstant nolog or
    "random effects level place is empty"

    or
    Code:
    melogit married i.age5 i.dur5 i.kid4 i.repcat i.edu3 husedyn twotypes || i.place: , noconstant nolog or
    or
    Code:
    melogit married i.age5 i.dur5 i.kid4 i.repcat i.edu3 husedyn twotypes || ibn.place: , noconstant nolog or
    "factor-variable and time-series operators not allowed"

    Would you please let me know how to create a generalized linear mixed additive model? I'll also appreciate your wisdom on what alternative approaches would add beyond a basic logit model with ibn.place. Thank you.

  • #2
    I will be most grateful if someone would kindly guide me on how to produce output from melogit using place, a categorical variable with nine countries. As above I'm only seeing error messages when I tinker. What am I missing, please? Thanks.

    Comment


    • #3
      Your second and third commands produce the error message "factor-variable and time-series operators not allowed" because the factor-variable expression i.place is not legal as the random effect level.

      I do not see anything wrong with your other -melogit- command:
      Code:
      melogit married i.age5 i.dur5 i.kid4 i.repcat i.edu3 husedyn twotypes || place: , noconstant nolog or
      nor have I ever encountered the error message "random effects level place is empty" before. I suspect that this is some kind of problem with your data, but as you show no example data, I can't even guess what that might be.

      All of that said, with n = 9 places, it probably does not make sense to use a random effects model. N = 9 is a very small sample of place-space. Your variance component estimate will be very imprecisely estimated using this model. Bear in mind that the maximum likelihood estimation used in all of Stata's multi-level models produce consistent estimates, which is to say that the estimates are approximately correct in large samples.

      Your original logit model strikes me as more sensible than using -melogit- with this data.

      Comment


      • #4
        Thanks very much, Clyde Schechter. I appreciate your taking the time to respond. I'm certainly happy to stick with my original logit model rather than pushing ahead with melogit. I'll interpret the ibn.place values as odds rather than odds ratios.

        Gratefully yours,
        Carrie

        Comment

        Working...
        X