View source: R/brm_marginal_data.R
brm_marginal_data | R Documentation |
Marginal summaries of the data.
brm_marginal_data(
data,
level = 0.95,
use_subgroup = !is.null(attr(data, "brm_subgroup"))
)
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. |
A tibble with one row per summary statistic and the following columns:
group
: treatment group.
subgroup
: subgroup level. Only included if the subgroup
argument of brm_marginal_data()
is TRUE
.
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 the level
argument.
upper
: upper bound of a normal equal-tailed confidence interval
with confidence level determined by the level
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.
Other marginals:
brm_marginal_draws()
,
brm_marginal_draws_average()
,
brm_marginal_grid()
,
brm_marginal_probabilities()
,
brm_marginal_summaries()
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.