The DHS Program User Forum
Discussions regarding The DHS Program data and results
Home » Data » Dataset use (other programs) » multilevel log-binomial regression (how do i estimate the risk ratio for a clustered binary out come using log binoial model.)
multilevel log-binomial regression [message #25263] Sun, 25 September 2022 01:31 Go to next message
jessy is currently offline  jessy
Messages: 8
Registered: August 2022
Member
Dear all,
I am currently running my thesis, comparing the performance of binary logistic, modified Poisson and log binomial models in determining factors associated with teen pregnancies.

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 2 level-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 wondering if there is an extra package i need to install to be able to run the log-binomial model at 2 levels.
or it is simply a limitation of the meglm command. Any insights or suggestions would be much appreciated

Thanks!!
Re: multilevel log-binomial regression [message #25273 is a reply to message #25263] Mon, 26 September 2022 16:35 Go to previous messageGo to next message
Bridgette-DHS is currently offline  Bridgette-DHS
Messages: 3172
Registered: February 2013
Senior Member
Following is a response from DHS staff member, Tom Pullum:

The help for meglm includes this:

/index.php?t=getfile&id=1943&private=0

This table says that the combination of binomial error and log link is not allowed. You say that the combination worked for you with a single-level glm model, and I am sure I have been able to run it as a single-level glm model. I'm guessing that you have found a difference between glm and meglm and there's nothing you can do to get around it. I would shift to a negative binomial or Poisson model. They will probably be indistinguishable in the estimates they produce.
Re: multilevel log-binomial regression [message #25275 is a reply to message #25273] Tue, 27 September 2022 02:16 Go to previous message
jessy is currently offline  jessy
Messages: 8
Registered: August 2022
Member
thanks dear, this is help ful and confirms my thoughts around using a log binomial model at 2 levels.
Previous Topic: Complex sample in R(Weight DHS Data in R)
Next Topic: respondents not visiting health facility
Goto Forum:
  


Current Time: Sat Oct 12 15:05:46 Coordinated Universal Time 2024