The package fails on old R releases, i.e., on R4.2.3. This happens because the family objects don't have a dispersion element prior to R4.3.0.
Here is the code causing error:
|
df = length(opt$par) + |
|
sum(vapply(family_list, function(x) is.na(x$dispersion), logical(1))), |
Here is the fix:
|
df = length(opt$par) + |
|
sum(vapply( |
|
family_list, |
|
function(x) !x$family %in% c("binomial", "poisson"), |
|
logical(1))), |