Internal function, not usually called directly.
Internal function, not called directly.
Internal function, not called directly.
extract_fit.coxme = function(.data, explanatory_name="explanatory", estimate_name="HR", estimate_suffix = "", p_name = "p", confint_level = 0.95, ...) x=.data if(confint_type == "default") confint_type = "Wald" explanatory = names(coxme::fixef(x)) estimate = exp(coxme::fixef(x)) # confint = # p = L_confint_name = paste0("L", confint_level*100) U_confint_name = paste0("U", confint_level*100)
df.out = dplyr::tibble(explanatory, estimate, confint[,1], confint[,2], p) colnames(df.out) = c(explanatory_name, paste0(estimate_name, estimate_suffix), L_confint_name, U_confint_name, p_name)
if(confint_level != 0.95) df.out = df.out
df.out = data.frame(df.out) return(df.out)
Extract model output to dataframe
extract_fit(...)# S3 method for glm
extract_fit(.data, explanatory_name = "explanatory",
estimate_name = "OR", estimate_suffix = "", p_name = "p",
exp = TRUE, confint_type = "profile", confint_level = 0.95, ...)
# S3 method for glmerMod
extract_fit(.data, explanatory_name = "explanatory",
estimate_name = "OR", estimate_suffix = "", p_name = "p",
exp = TRUE, confint_type = "Wald", confint_level = 0.95, ...)
# S3 method for lm
extract_fit(.data, explanatory_name = "explanatory",
estimate_name = "Coefficient", estimate_suffix = "", p_name = "p",
confint_level = 0.95, ...)
# S3 method for lmerMod
extract_fit(.data, explanatory_name = "explanatory",
estimate_name = "OR", estimate_suffix = "", p_name = "p",
confint_type = "Wald", confint_level = 0.95, ...)
# S3 method for coxph
extract_fit(.data, explanatory_name = "explanatory",
estimate_name = "HR", estimate_suffix = "", p_name = "p", ...)
# S3 method for crr
extract_fit(.data, explanatory_name = "explanatory",
estimate_name = "HR", estimate_suffix = "", p_name = "p", ...)
# S3 method for stanfit
extract_fit(.data, explanatory_name = "explanatory",
estimate_name = "OR", estimate_suffix = "", p_name = "p",
digits = c(2, 2, 3), X, ...)
Other arguments.
Model output.
Name for this column in output.
Name for this column in output.
Appeneded to estimate name.
Name given to p-value estimate
One of c("profile", "default")
for GLM
models or c("profile", "Wald", "boot")
for glmer/lmer
models.
Not implemented for lm, coxph or coxphlist
.
The confidence level required.
Design matrix from Stan modelling procedure.