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?