This function takes a model object, a predictor, and a parameter and prints the numeric output.

print_model_params(model, predictor, parameter)

Arguments

model

A model object

predictor

(character) The effect (fixed/random) you want to report

parameter

(character) The parameter you want to report ('estimate', 'std.error', 'statistic')

Examples

library(lme4) mod1 <- lm(mpg ~ wt, data = mtcars) mod2 <- lmer(Reaction ~ 1 + Days + (1|Subject), data = sleepstudy, REML = FALSE) print_model_params(model = mod1, predictor = "wt", parameter = "estimate")
#> Registered S3 method overwritten by 'broom.mixed': #> method from #> tidy.gamlss broom
#> [1] "-5.34"
print_model_params(model = mod2, predictor = "Days", parameter = "estimate")
#> [1] "10.47"