Summary statistics of the marginal posterior of an MMRM.
Source:R/brm_marginal_summaries.R
brm_marginal_summaries.Rd
Summary statistics of the marginal posterior of an MMRM.
Arguments
- draws
Posterior draws of the marginal posterior obtained from
brm_marginal_draws()
.- level
Numeric of length 1 between 0 and 1, credible level for the credible intervals.
Value
A tibble with one row per summary statistic and the following columns:
marginal
: type of marginal distribution. Ifoutcome
was"response"
inbrm_marginal_draws()
, then possible values include"response"
for the response on the raw scale,"change"
for change from baseline, and"difference"
for treatment difference in terms of change from baseline. Ifoutcome
was"change"
, then possible values include"response"
for the response one the change from baseline scale and"difference"
for treatment difference.statistic
: type of summary statistic."lower"
and"upper"
are bounds of an equal-tailed quantile-based credible interval.group
: treatment group.subgroup
: subgroup level, if applicable.time
: discrete time point.value
: numeric value of the estimate.mcse
: Monte Carlo standard error of the estimate. Thestatistic
column has the following possible values:mean
: posterior mean.median
: posterior median.sd
: posterior standard deviation of the mean.lower
: lower bound of an equal-tailed credible interval of the mean, with credible level determined by thelevel
argument.upper
: upper bound of an equal-tailed credible interval with credible level determined by thelevel
argument.
See also
Other marginals:
brm_marginal_data()
,
brm_marginal_draws()
,
brm_marginal_draws_average()
,
brm_marginal_grid()
,
brm_marginal_probabilities()
Examples
if (identical(Sys.getenv("BRM_EXAMPLES", unset = ""), "true")) {
set.seed(0L)
data <- brm_data(
data = brm_simulate_simple()$data,
outcome = "response",
group = "group",
time = "time",
patient = "patient",
reference_group = "group_1",
reference_time = "time_1"
)
formula <- brm_formula(
data = data,
baseline = FALSE,
baseline_time = FALSE
)
tmp <- utils::capture.output(
suppressMessages(
suppressWarnings(
model <- brm_model(
data = data,
formula = formula,
chains = 1,
iter = 100,
refresh = 0
)
)
)
)
draws <- brm_marginal_draws(data = data, formula = formula, model = model)
suppressWarnings(brm_marginal_summaries(draws))
}