Error: Family 'binomial' requires numeric responses

I am new into brms package and Bayesian modelling. I am trying just to run some trials with the package so I was wondering why the following Error message appears when I try to model a binomial response in function of just two categorical fixed effects (Eg. Behaviour ~ Sex * Day_Period):

Error: Family ‘binomial’ requires numeric responses.

When I 've run the same model in lme4, I didn’t get any error message like this one. Is something related just to BRMS package or just another thing that I am taking into account?

Is your response (Behaviour) coded as 0/1? Check with,

typeof(d$Behaviour)

where d is the name of your data frame.

I coded Behaviour as a factor of 2 levels (Active and Inactive). I just coded a new variable relating each behavioural state to 0 and 1 and now the model is running perfectly.

Thanks!

1 Like