View source: R/helpers-model.R
| extract_parameter_dimensions | R Documentation |
This functions extracts the names, dimensions, and types from a compiled STAN parameters blocks generated by bmm or brms. This function is used to specify initial values for bmm models.
extract_parameter_dimensions(parameters_block)
parameters_block |
The parameters block extracted via |
A list of all parameters, their types, and dimensions as as specified in the STAN data generated by bmm and brms
# generate simple stan code from brms
stan_code <- stancode(brms::bf(x ~ 1 + cond + (1 + cond | ID)),
data = data.frame(
x = rnorm(100),
ID = rep(1:50, each = 2),
cond = rep(1:2, times = 50)
)
)
extracted_program_blocks <- extract_stan_blocks(stan_code)
par_dims <- extract_parameter_dimensions(extracted_program_blocks$parameters) #'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.