brm_marginal_data {brms.mmrm} | R Documentation |
Marginal summaries of the data.
Description
Marginal summaries of the data.
Usage
brm_marginal_data(
data,
level = 0.95,
use_subgroup = !is.null(attr(data, "brm_subgroup"))
)
Arguments
data |
A classed data frame from |
level |
Numeric of length 1 from 0 to 1, level of the confidence intervals. |
use_subgroup |
Logical of length 1, whether to summarize the data by each subgroup level. |
Value
A tibble with one row per summary statistic and the following columns:
-
group
: treatment group. -
subgroup
: subgroup level. Only included if thesubgroup
argument ofbrm_marginal_data()
isTRUE
. -
time
: discrete time point. -
statistic
: type of summary statistic. -
value
: numeric value of the estimate.
The statistic
column has the following possible values:
-
mean
: observed mean response after removing missing values. -
median
: observed median response after removing missing values. -
sd
: observed standard deviation of the response after removing missing values. -
lower
: lower bound of a normal equal-tailed confidence interval with confidence level determined by thelevel
argument. -
upper
: upper bound of a normal equal-tailed confidence interval with confidence level determined by thelevel
argument. -
n_observe
: number of non-missing values in the response. -
n_total
: number of total records in the data for the given group/time combination, including both observed and missing values.
See Also
Other marginals:
brm_marginal_draws()
,
brm_marginal_draws_average()
,
brm_marginal_grid()
,
brm_marginal_probabilities()
,
brm_marginal_summaries()
Examples
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"
)
brm_marginal_data(data = data)