Extract marginal treatment effects from a fitted ML-UMR model. For binomial: log odds ratio, risk difference, risk ratio. For normal: mean difference. For poisson: rate ratio.
Arguments
- object
An
mlumr_fitobject- population
Which population:
"both","index", or"comparator"- effect
Which effect measure. For binomial:
"all","lor","rd", or"rr". For normal:"all"or"md"(mean difference). For poisson:"all"or"rr"(rate ratio).- summary
Return summary (
TRUE) or full draws (FALSE)- probs
Quantiles for summary
See also
predict.mlumr_fit() for absolute predictions;
conditional_effects() for covariate-conditional effects at specific
profiles; prior_sensitivity() to check how strongly the marginal
effect depends on prior_beta.
Examples
if (FALSE) { # \dontrun{
# All effect measures for both populations
marginal_effects(fit)
# Only the log odds ratio in the index population
marginal_effects(fit, population = "index", effect = "lor")
# Full posterior draws rather than summary statistics
marginal_effects(fit, summary = FALSE)
} # }
