This function takes a model object and a predictor, and prints the output in parenthesis. Includes confidence intervals, stat type and p-values.

print_model_params_p(model, predictor, latex = TRUE)

Arguments

model

A model object

predictor

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

latex

(Logical) If true, output is appropriate for LaTeX. Otherwise formatting is for markdown.

Examples

#> #> Attaching package: ‘lmerTest’
#> The following object is masked from ‘package:lme4’: #> #> lmer
#> The following object is masked from ‘package:stats’: #> #> step
mod1 <- lm(mpg ~ wt, data = mtcars) mod2 <- lmer(Reaction ~ 1 + Days + (1|Subject), data = sleepstudy, REML = FALSE) print_model_params_p(model = mod1, predictor = "wt", latex = FALSE)
#> [1] "(CI = [-6.49, -4.2]; *t* = -9.56; *p* < .001)"
print_model_params_p(model = mod2, predictor = "Days")
#> [1] "(CI = [8.9, 12.04]; \\emph{t} = 13.06; \\emph{p} < .001)"