| compute_aor | R Documentation |
Computes the marginal (average) treatment effect from individual-level
potential outcomes stored in GLM simulation data.
This is the GLM analogue of compute_ahr for survival data.
compute_aor(df, subset_indicator = NULL, effect_measure = "OR")
df |
Data frame with potential outcome columns ( |
subset_indicator |
Optional logical/integer vector for subsetting.
If provided, only rows where |
effect_measure |
Character. One of |
For binary outcomes (p0, p1):
OR: odds(mean(p1)) / odds(mean(p0))
RD: mean(p1) - mean(p0)
RR: mean(p1) / mean(p0)
For continuous or count outcomes (mu0, mu1):
MD: mean(mu1) - mean(mu0)
IRR: mean(mu1) / mean(mu0)
IRD: mean(mu1) - mean(mu0)
Numeric effect value, or NA_real_ if required columns
are missing.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.