ss_ranef_beta | R Documentation |
ss_ranef_beta()
fits a mixed-effects model with
random intercepts and random slopes, with a spike-and-slab prior on the random slopes.
ss_ranef_beta( y, X, unit, burnin = 1000, iter = 1000, chains = 4, priors = NULL, vars2monitor = c("alpha", "beta", "gamma", "rho", "sigma", "tau1", "tau2", "theta1", "theta2") )
y |
A vector containing the outcome |
X |
A vector containing the predictor |
unit |
A vector of the same length as |
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:
alpha: The fixed effect for the intercept
beta: The fixed effect for the slope
gamma: The inclusion indicators for the slope random effects
rho: The correlation between theta1 and theta2
sigma: The residual standard deviation
tau1: The standard deviation for alpha
tau2: The standard deviation for beta
theta1: The random effects for alpha
theta2: The random effects for beta
An object of type ssranef
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.