View source: R/simulation_tables.R
| interpret_estimation_table | R Documentation |
Produces a templated text summary of the estimation properties table, automatically populating numerical results from the simulation output. Useful for reproducible vignettes where interpretation paragraphs should update when simulations are re-run.
interpret_estimation_table(
results,
dgm,
analysis_method = "FSlg",
n_sims = NULL,
n_boots = 300,
digits = 2,
scenario = NULL,
cat = TRUE,
subgroup_notation = c("harm", "benefit"),
trim_threshold = 1000,
trim_fraction = 0.01
)
results |
Data frame of simulation results (same as for
|
dgm |
DGM object with true parameter values. |
analysis_method |
Character. Which analysis method to summarise.
Default: |
n_sims |
Integer. Total number of simulations (for detection rate).
If |
n_boots |
Integer. Number of bootstraps (for narrative). Default: 300. |
digits |
Integer. Decimal places for reported values. Default: 2. |
scenario |
Character or
If |
cat |
Logical. If |
subgroup_notation |
Character. |
trim_threshold |
Numeric or |
trim_fraction |
Numeric in |
Invisibly returns the interpretation as a character string.
build_estimation_table,
format_oc_results, get_dgm_hr
## Not run:
# In a vignette chunk with results = "asis":
interpret_estimation_table(results_null, dgm_null, scenario = "null")
# Capture for further processing:
txt <- interpret_estimation_table(results_alt, dgm_alt, cat = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.