Open jerlich opened 3 years ago
I'm not sure we can do anything about this, as Binomial(1.5, 1)
throws an error. Contrary to us, R gives an AIC when estimating a binomial model with non-integer counts, but it prints a warning. So I'm not sure their AIC can be trusted. Do you have a reason to think that non-integer counts would make any statistical sense?
Looks like the error is thrown from this package
julia> aic(modpy) # error
ERROR: InexactError: Float64(0.006358248591326209)
Stacktrace:
[1] _safe_int(x::Float64)
@ GLM ~/.julia/dev/GLM/src/glmtools.jl:510
[2] loglik_obs
@ ~/.julia/dev/GLM/src/glmtools.jl:528 [inlined]
[3] loglikelihood(m::GeneralizedLinearModel{GLM.GlmResp{…}, GLM.DensePredChol{…}})
@ GLM ~/.julia/dev/GLM/src/glmfit.jl:313
[4] aic(model::GeneralizedLinearModel{GLM.GlmResp{…}, GLM.DensePredChol{…}})
@ StatsAPI ~/.julia/packages/StatsAPI/zqIEd/src/statisticalmodel.jl:189
[5] top-level scope
@ REPL[270]:1
In Julia 1.5.1 or 1.6. Here
py
is a vector of probabilities andy
are "samples" drawn from py.py
isn't reallyBinomial()
butglm
still fits the model. You can get the deviance of this model,modpy
, but theaic, bic, loglikelihood
all giveinexact error