library(dplyr)
# Create example results
results <- tibble::tibble(
parameter = c("trt_Week24", "lsm_ref_Week24", "lsm_alt_Week24"),
description = c("Treatment Effect", "LS Mean (Reference)", "LS Mean (Treatment)"),
est = c(-2.45, 5.20, 2.75),
se = c(0.89, 0.65, 0.71),
lci = c(-4.20, 3.93, 1.36),
uci = c(-0.70, 6.47, 4.14),
pval = c(0.006, NA, NA)
)
# Format for publication
formatted <- format_results_table(results)
print(formatted[, c("description", "est_ci", "pval_fmt")])
Run the code above in your browser using DataLab