ss_ranef_mv | R Documentation |
ss_ranef_mv()
fits a multivariate mixed-effects model with
random intercepts and random slopes for two outcomes. A spike-and-slab prior is placed on the random slopes of both outcomes.
ss_ranef_mv( Y, X, unit, burnin = 1000, iter = 1000, chains = 4, priors = NULL, vars2monitor = c("B", "theta", "gamma1", "gamma2", "sigma", "Tau", "rb", "rw") )
Y |
A two column matrix containing the outcomes of interest. |
X |
A vector containing the predictor variable. |
unit |
A vector of containing a unique identifier for each row in |
burnin |
The number of iterations to use as burnin. Defaults to 1000. |
iter |
The number of iterations to use for estimating the parameters. Defaults to 1000. |
chains |
The number of MCMC chains to use. Defaults to 4. |
priors |
A named list to specify priors. Defaults to NULL. See README for details. |
vars2monitor |
A vector containing the names of which parameters to monitor. See details below. |
The parameters that can be tracked are:
B: The fixed effects.
B_1_1 and B_1_2 corresponds to the fixed effect intercept and slope for the first outcome, respectively.
B_2_1 and B_2_2 corresponds to the fixed effect intercept and slope for the second outcome, respectively.
gamma1: The inclusion indicators for the slope random effects of the first outcome.
gamma2: The inclusion indicators for the slope random effects of the second outcome.
rb: The between-unit correlations, or the correlations between the random effects.
rb_1_2: Correlation between random intercept and random slope for the first outcome
rb_1_3: Correlation between random intercept for the first outcome and random intercept for the second outcome
rb_1_4: Correlation between random intercept for the first outcome and random slope for the second outcome
rb_2_3: Correlation between random slope for the first outcome and random intercept for the second outcome
rb_2_4: Correlation between random slope for the first outcome and random slope for the second outcome
rb_3_4: Correlation between random intercept and random slope for the second outcome
rw: The correlation between the residual standard deviations, sigma_1 and sigma_2
sigma: The residual standard deviations sigma_1 (first outcome) and sigma_2 (second outcome)
Tau: The (co-)variances for the random effects
Tau_1_1: Variance for the random intercept of the first outcome
Tau_2_2: Variance for the random slope of the first outcome
Tau_3_3: Variance for the random intercept of the second outcome
Tau_4_4: Variance for the random slope of the second outcome
theta: The random effects each outcome. The names are formatted as theta_unitID_randomEffect
. E.g., theta_3_2 would correspond
to the random intercept of the 2nd outcome for the 3rd unit.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.