brm_prior_simple {brms.mmrm} | R Documentation |
Simple prior for a brms
MMRM
Description
Generate a simple prior for a brms
MMRM.
Usage
brm_prior_simple(
data,
formula,
intercept = "student_t(3, 0, 2.5)",
coefficients = "student_t(3, 0, 2.5)",
sigma = "student_t(3, 0, 2.5)",
unstructured = "lkj(1)",
autoregressive = "",
moving_average = "",
compound_symmetry = "",
correlation = NULL
)
Arguments
data |
A classed data frame from |
formula |
An object of class |
intercept |
Character of length 1, Stan code for the prior to set on the intercept parameter. |
coefficients |
Character of length 1, Stan code for the prior to set independently on each of the non-intercept model coefficients. |
sigma |
Character of length 1, Stan code for the prior to set independently on each of the log-scale standard deviation parameters. Should be a symmetric prior in most situations. |
unstructured |
Character of length 1,
Stan code for an unstructured correlation prior.
Supply the empty string |
autoregressive |
Character of length 1,
Stan code for a prior on autoregressive correlation parameters.
Supply the empty string |
moving_average |
Character of length 1,
Stan code for a prior on moving average correlation parameters.
Supply the empty string |
compound_symmetry |
Character of length 1,
Stan code for a prior on compound symmetry correlation parameters.
Supply the empty string |
correlation |
Deprecated on 2024-04-22
(version 0.1.0.9004). Please use arguments like |
Details
In brm_prior_simple()
, you can separately choose priors for
the intercept, model coefficients, log-scale standard deviations,
and pairwise correlations between time points within patients.
However, each class of parameters is set as a whole. In other words,
brm_prior_simple()
cannot assign different priors
to different fixed effect parameters.
Value
A classed data frame with the brms
prior.
See Also
Other priors:
brm_prior_archetype()
,
brm_prior_label()
,
brm_prior_template()
Examples
set.seed(0L)
data <- brm_simulate_outline()
data <- brm_simulate_continuous(data, names = c("age", "biomarker"))
formula <- brm_formula(
data = data,
baseline = FALSE,
baseline_time = FALSE,
check_rank = FALSE
)
brm_prior_simple(
data = data,
formula = formula,
intercept = "student_t(3, 0, 2.5)",
coefficients = "normal(0, 10)",
sigma = "student_t(2, 0, 4)",
unstructured = "lkj(2.5)"
)