GLM.jl
GLM.jl copied to clipboard
Binomial with `n != 1`
Not sure if this is missing or just not documented. But it'd be nice to have a way to be able to do Binomial regressions with n not equal to 1, e.g. students_passing ~ teacher_salary with students_passing ~ Binomial(class_size, p_from_regression)
The wts kwarg can be used to specify the the number of trials associated with a Binomial observation. Note that the response is always on the proportion/probability scale, so it would be prop_students_passing ~ ... with wts=n_students and NOT n_students_passing ~ ....
I see, thanks. In that case, maybe this should be documented, and the error message replaced to be clearer?