print_model_params_p: Helper function for reporting model parameters in parenthesis

View source: R/print_model_params_p.R

print_model_params_pR Documentation

Description

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

Usage

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

library(lme4)
library(lmerTest)
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)
print_model_params_p(model = mod2, predictor = "Days")

jvcasillas/academicWriteR documentation built on Dec. 28, 2024, 5:09 p.m.