brm_marginal_grid {brms.mmrm}R Documentation

Marginal names grid.

Description

Describe the column names of the data frames output by brm_marginal_draws().

Usage

brm_marginal_grid(data, formula)

Arguments

data

A classed data frame from brm_data(), or an informative prior archetype from a function like brm_archetype_successive_cells().

formula

An object of class "brmsformula" from brm_formula() or brms::brmsformula(). Should include the full mapping of the model, including fixed effects, residual correlation, and heterogeneity in the discrete-time-specific residual variance components.

Details

Useful for creating custom posterior summaries from the draws.

Value

A data frame with a name column with the names of columns of data frames in brm_marginal_draws(), along with metadata to describe which groups, subgroups, and time points those columns correspond to.

See Also

Other marginals: brm_marginal_data(), brm_marginal_draws(), brm_marginal_draws_average(), brm_marginal_probabilities(), brm_marginal_summaries()

Examples

data <- brm_simulate_outline()
brm_marginal_grid(data, brm_formula(data))
data <- brm_simulate_outline(n_subgroup = 2L)
brm_marginal_grid(data, brm_formula(data))

[Package brms.mmrm version 1.1.0 Index]