Fitting logistic regression models where the dependent variable is proportions in brms

I am working with survey data, from the DHS, where I aim to fit a logistic regression model to explain neonatal mortality.

I clean the data in a way that I compute the proportion of neonatal mortality per region(county), while accounting for sampling weights and sampling design, so that the final dataset has covariates(x_1, …x_p) and the outcome variable is a proportion (y) e.g. proportions of neonates who died in that county, and was aiming to fit a logistic regression model.

When using the usual glm() in R, I am able to fit (with a warning: non integer successes in binomial glm), however in using brms and supplying family = binomial(), an error appears: Error: Family ‘binomial’ requires integer responses.

I have already checked that the correct syntax is to supply:

brms(y | trials(n) ~ x1 + .... + xp, data = data, family=binomial())

In my case however, I do lack the trials, as the proportion is already aggregated.
Is there a way to fit logistic regression models (where the dependent variable is already a proportion) in brms?

If you’re not interested in fitting a model to the counts themselves, which works great with family = binomial(), I suspect the next best thing is to use a beta likelihood with family = Beta().


Thanks for the response,
I have already considered going forward with that.

For the beta family, are the exponentiated coefficients “odds” as well ?

I believe brm() uses the logit link the beta mu parameter.

1 Like