stan_inits: Calculate Initial Values for Stan VM Model

Description Usage Arguments Value Author(s) Examples

View source: R/modeler.R

Description

Internal function used to get rough starting values for a variability model in Stan. Uses inidivudal standard deviations, means, and linear regressions.

Usage

1
2
stan_inits(stan.data, design = c("V -> Y", "V -> M -> Y", "V", "X -> V",
  "X -> V -> Y", "X -> M -> V"), useU, ...)

Arguments

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

whether to include the random intercepts

...

Additional arguments (not currently used)

Value

A named list containing the initial values for Stan.

Author(s)

Joshua F. Wiley <[email protected]>

Examples

1
# make me!

Example output

Loading required package: rstan
Loading required package: ggplot2
Loading required package: StanHeaders
rstan (Version 2.16.2, packaged: 2017-07-03 09:24:58 UTC, GitRev: 2e1f913d3ca3)
For execution on a local, multicore CPU with excess RAM we recommend calling
rstan_options(auto_write = TRUE)
options(mc.cores = parallel::detectCores())

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