R/print_model_params.R
print_model_params.Rd
This function takes a model object, a predictor, and a parameter and prints the numeric output.
print_model_params(model, predictor, parameter)
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') |
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")#>#> #>#> [1] "-5.34"print_model_params(model = mod2, predictor = "Days", parameter = "estimate")#> [1] "10.47"