Announcement

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

  • Multilevel log-binomial model

    Dear Statalist users,

    I am trying to fit a multilevel log-binomial model in order to calculate the prevalence (risk) ratio (rather than the odds ratio) for a clustered binary outcome and am running into an unexpected error.

    using the glm command, one can correctly specify a single-level log-binomial model as

    glm depvar indvar, family(binomial) link(log) eform

    However, when specifying the same model as a three-level, random intercept model using meglm

    meglm depvar indvar || village: || household: , family(binomial) link(log) eform

    I get the following error,

    link log is not allowed with family bernoulli
    r(198);


    I am running Stata 14, so am uncertain whether this is a bug in the new version or simply a limitation of the meglm command. Any insights or suggestions would be much appreciated

    Thanks!!

    As a side note-a reasonable analytic option would be to use Poisson regression with robust SE's, but I prefer to use the log-binomial approach if possible. See the link below for a nice presentation of the topic
    Stata FAQ--How can I estimate relative risk using glm for common outcomes in cohort studies?

  • #2
    if you look at the help file for meglm you will see a table showing which links are allowed with which families; in this table it is clear that a log link is not allowed with family=binomial (or bernoulli); I don't know why this is not allowed (even in single level models this often fails to converge and that may be the reason)

    Comment


    • #3
      Thanks Rich. I should have read the manual more carefully before posting. You may be right about it not being an option in meglm due to the convergence issues. After posting I tried running this on my data using the gllamm package and it failed to converge after ~15 minutes or so. Able to successfully run it as a Poisson model, however.

      Comment

      Working...
      X