vm_stan | R Documentation |
Internal function to create and compile a Stan model.
vm_stan(
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,
...,
template_only = FALSE
)
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 |
template_only |
A logical, not commonly used. If |
A compiled Stan model.
Joshua F. Wiley <jwiley.psych@gmail.com>
varian:::vm_stan("V -> Y", useU=TRUE, template_only = TRUE)
varian:::vm_stan("V -> Y", useU=TRUE, UQ = TRUE, IIVQ = TRUE, template_only = TRUE)
varian:::vm_stan("V -> M -> Y", useU=TRUE, UQ = TRUE, IIVQ = TRUE, template_only = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.