vm_stan: Create a Stan class VM object

Description Usage Arguments Value Author(s) Examples

View source: R/modeler.R

Description

Internal function to create and compile a Stan model.

Usage

1
2
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 <[email protected]>

Examples

1
2
3
4
5
6
7
8
9
# 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)

varian documentation built on May 29, 2017, 7:14 p.m.