model-method-variables | R Documentation |
The $variables()
method of a CmdStanModel
object returns
a list, each element representing a Stan model block: data
, parameters
,
transformed_parameters
and generated_quantities
.
Each element contains a list of variables, with each variables represented
as a list with infromation on its scalar type (real
or int
) and
number of dimensions.
transformed data
is not included, as variables in that block are not
part of the model's input or output.
variables()
The $variables()
returns a list with information on input and
output variables for each of the Stan model blocks.
Other CmdStanModel methods:
model-method-check_syntax
,
model-method-compile
,
model-method-diagnose
,
model-method-expose_functions
,
model-method-format
,
model-method-generate-quantities
,
model-method-laplace
,
model-method-optimize
,
model-method-pathfinder
,
model-method-sample
,
model-method-sample_mpi
,
model-method-variational
## Not run:
file <- file.path(cmdstan_path(), "examples/bernoulli/bernoulli.stan")
# create a `CmdStanModel` object, compiling the model is not required
mod <- cmdstan_model(file, compile = FALSE)
mod$variables()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.