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?
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?
Comment