stan_inits | R Documentation |
Internal function used to get rough starting values for a variability model in Stan. Uses inidivudal standard deviations, means, and linear regressions.
stan_inits(
stan.data,
design = c("V -> Y", "V -> M -> Y", "V", "X -> V", "X -> V -> Y", "X -> M -> V"),
useU = TRUE,
UQ = FALSE,
IIVQ = FALSE,
centerU = 0,
centerIIV = 0,
...
)
stan.data |
A list containing the data to be passed to Stan |
design |
A character string indicating the type of model to be run. One of “V -> Y” for variability predicting an outcome, “V -> M -> Y” for mediation of variability on an outcome, “V” to take posterior samples of individual variability estimates alone. |
useU |
A logical value whether the latent intercept estimated in Stage 1 should
also be used as a predictor. Defaults to |
UQ |
A logical value whether the latent intercept estimated in Stage 1 should
also be used as a predictor with a qudratice effect. Defaults to |
IIVQ |
A logical value whether the latent variabilities estimated in Stage 1 should
also be used as a predictor with a qudratice effect. Defaults to |
centerU |
A numeric vector of length one (scalar) that is used to center the latent intercept estimates before using as a predictor of the outcome / mediator. Uses the formula: (U - centerU). Particularly useful when including quadratic terms. |
centerIIV |
A numeric vector of length one (scalar) that is used to center the latent variability estimates before using as a predictor of the outcome / mediator. Uses the formula: (IIV - centerIIV). Particularly useful when including quadratic terms. |
... |
Additional arguments passed to |
A named list containing the initial values for Stan.
Joshua F. Wiley <josh@elkhartgroup.com>
# make me!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.