This is presumably because the offset is of a different numeric type than the other data. However, even without an offset and switching the data to Float32 like so:
data = (X = Float32.(rand(n) .+ 0.5), y = Float32.(rand(n)))
GLM.glm(@GLM.formula(y ~ 0 + X), data, Binomial())
the code above still throws an error, namely:
MethodError: no method matching delbeta!(::GLM.DensePredChol{Float64, LinearAlgebra.CholeskyPivoted{…}}, ::Vector{Float32}, ::Vector{Float32})
Given that the method works when all variables are left as Float64 and the non-descriptive error message, it seems this may not be intentional behavior.
I recently ran into an issue where the
glm
function failed in the following code:with the error
This is presumably because the offset is of a different numeric type than the other data. However, even without an offset and switching the data to Float32 like so:
the code above still throws an error, namely:
Given that the method works when all variables are left as Float64 and the non-descriptive error message, it seems this may not be intentional behavior.