Announcement

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

  • meglm distribution(gamma) with link(identity) NOT possible. Any work arounds?

    The command meglm doesn’t support the combination of distribution(gamma) with link(identity). However, this is the combination that I need for my analysis.

    Does anyone have a community-created command or suggestion how to conduct this analysis in Stata16?

  • #2
    A couple of possibilities. The easy way, which is probably not what you want, is to fit a population average model with -xtgee-. That allows for the combination gamma distribution family and identity link function.

    As an alternative, you could try programming the likelihood function yourself and use -menl-. You can use this webpage as a guide for how to set up the likelihood. It's about SAS's PROC NLMIXED (Stata's analogue is -menl-). Scroll down to where it talks about how to program in PROC NLMIXED the equivalent of what PROC GENMOD / GLIMMIX (generalized linear model) would use for the likelihood for a gamma distribution family, and go from there. (I'm assuming that it's possible to program that ugly gamma distribution function shown there in an -menl- substitutable expression.) Note that what's shown there does not have any random effects, and so you'd need to include those in your substitutable expression—refer to the -menl- entry in Stata's user's manual for that.

    Comment


    • #3
      Thank you, Joseph.

      You are correct, using a population average model will not answer my research question. Thank you so much for suggesting menl. I will try my best.
      Last edited by Brennan RBratton; 21 Nov 2019, 21:14.

      Comment

      Working...
      X