A robust and resilient alternative to stats::family
. To avoid issues
with models like gamm4
.
Examples
data(mtcars)
x <- glm(vs ~ wt, data = mtcars, family = "binomial")
get_family(x)
#>
#> Family: binomial
#> Link function: logit
#>
x <- mgcv::gamm(
vs ~ am + s(wt),
random = list(cyl = ~1),
data = mtcars,
family = "binomial"
)
#>
#> Maximum number of PQL iterations: 20
#> iteration 1
#> iteration 2
#> iteration 3
#> iteration 4
#> iteration 5
#> iteration 6
#> iteration 7
#> iteration 8
get_family(x)
#>
#> Family: binomial
#> Link function: logit
#>