enw_formula_as_data_list | R Documentation |
Format formula data for use with stan
enw_formula_as_data_list(formula, prefix, drop_intercept = FALSE)
formula |
The output of |
prefix |
A character string indicating variable label to use as a prefix. |
drop_intercept |
Logical, defaults to |
A list defining the model formula. This includes:
prefix_fintercept:
Is an intercept present for the fixed effects design
matrix.
prefix_fdesign
: The fixed effects design matrix
prefix_fnrow
: The number of rows of the fixed design matrix
prefix_findex
: The index linking design matrix rows to observations
prefix_fnindex
: The length of the index
prefix_fncol
: The number of columns (i.e effects) in the fixed effect
design matrix (minus 1 if an intercept is present).
prefix_rdesign
: The random effects design matrix
prefix_rncol
: The number of columns (i.e random effects) in the random
effect design matrix (minus 1 as the intercept is dropped).
Functions used to help convert models into the format required for stan
enw_get_cache()
,
enw_model()
,
enw_pathfinder()
,
enw_priors_as_data_list()
,
enw_replace_priors()
,
enw_sample()
,
enw_set_cache()
,
enw_stan_to_r()
,
enw_unset_cache()
,
remove_profiling()
,
write_stan_files_no_profile()
f <- enw_formula(~ 1 + (1 | cyl), mtcars)
enw_formula_as_data_list(f, "mtcars")
# A missing formula produces the default list
enw_formula_as_data_list(prefix = "missing")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.