R/print_model_params_p.R
print_model_params_p.Rd
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)
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. |
#> #>#>#> #>#>#> #>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)"