Looking at their example functions (e.g.
https://github.com/tidymodels/broom/blo ... -tidiers.R) the functions that you would need are something like:
Code: Select all
tidy.mlwinfitIGLS <- function(x, conf.int = FALSE, conf.level = .95, ...) {
est <- coef(x)
term <- names(est)
sd <- sqrt(diag(vcov(x)))
zscore <- est / sd
pval <- 2 * stats::pnorm(abs(zscore), lower.tail = FALSE)
ret <- tibble::tibble(term=term, estimate=est, std.error=sd, statistic=zscore, p.value=pval)
if (conf.int) {
conf <- plyr::unrowname(confint(x, level = conf.level))
colnames(conf) <- c("conf.low", "conf.high")
ret <- cbind(ret, conf)
}
ret
}
glance.mlwinfitIGLS <- function(x, ...) {
tibble::tibble(
logLik = stats::logLik(x),
AIC = stats::AIC(x),
BIC = stats::BIC(x),
df.residual = stats::df.residual(x),
nobs = stats::nobs(x)
)
}
Note that I have included AIC, BIC and df.residual to match their example and I do not know if these make sense in the multilevel context.