Skip to contents

rmorie's own renderer (no stargazer / gt / gtable): the same table in plain text, Markdown, LaTeX (booktabs-style rules without requiring the package), or HTML.

Usage

morie_mrm_report(
  effect,
  format = c("text", "markdown", "latex", "html"),
  digits = 3,
  caption = "MRM causal-effect estimates"
)

Arguments

effect

A morie_mrm_effect object (or any list with a compatible results data frame).

format

One of "text", "markdown", "latex", "html".

digits

Significant digits (default 3).

caption

Table caption.

Value

Character vector of rendered lines (invisibly printed for "text").

Examples

set.seed(1)
df <- data.frame(y = rnorm(300), t = rbinom(300, 1, 0.5),
                 x = rnorm(300))
eff <- morie_mrm_estimate_causal_effect(df, "t", "y", "x",
                                        methods = "ate")
#> Warning: categorical coding hazards in covariates [x] - run morie_audit_categories(data) and fix before trusting these estimates.
cat(morie_mrm_report(eff, format = "markdown"), sep = "\n")
#> | Method                  | Estimate | SE    | 95% CI          | p (adj.) |
#> |-------------------------|----------|-------|-----------------|----------|
#> | ipw ate (rmorie native) | -0.0555  | 0.111 | [-0.274, 0.163] | 0.619    |
#> Consensus (inverse-variance): -0.0555 (SE 0.111). holm correction; n = 300.