vm_stan {varian}R Documentation

Create a Stan class VM object

Description

Internal function to create and compile a Stan model.

Usage

vm_stan(design = c("V -> Y", "V -> M -> Y", "V", "X -> V", "X -> V -> Y",
  "X -> M -> V"), useU = TRUE, ...)

Arguments

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 TRUE.

...

Additional arguments passed to stan_model.

Value

A compiled Stan model.

Author(s)

Joshua F. Wiley <josh@elkhartgroup.com>

Examples

# Make Me!
## Not run: 
  test1 <- vm_stan("V -> Y", useU=TRUE)
  test2 <- vm_stan("V -> Y", useU=FALSE)
  test3 <- vm_stan("V -> M -> Y", useU=TRUE)
  test4 <- vm_stan("V -> M -> Y", useU=FALSE)
  test5 <- vm_stan("V")

## End(Not run)

[Package varian version 0.2.2 Index]