| get_parameters_smart | R Documentation |
The function is used in the depths to map parameter inputs to the parameters of a model. One application is to get the search space as a vector, matching with the free parameters of a model. Other applications map, for example, mean values to the free parameters of a model. Relevant when users use the "default parameters" approach where they only specify the parameter labels and assume the package figures out how each parameter relates across conditions (see simulate_data). This comes in handy, when freeing a parameter across conditions, while the search space remains the same (otherwise, a user would always have to adapt the vectors for lower/upper to match with x2prms_vals)
get_parameters_smart(
drift_dm_obj,
input_a,
input_b = NULL,
labels = TRUE,
is_l_u = TRUE,
fill_up_with = NULL
)
drift_dm_obj |
an object of type drift_dm |
input_a, input_b |
either a atomic vector or list (see create_matrix_smart) |
labels |
optional logical, if |
is_l_u |
optional logical, if |
fill_up_with |
optional values used to fill up the returned vectors
for all parameters that are not specified in |
The function first gets all unique parameters across conditions using
prms_cond_combo. The unique parameter labels are then forwarded
to create_matrix_smart, together with all (!) the conditions in the
model and the input_a/input_b arguments. Subsequently, the created matrices
are wrangled into vectors in accordance with prms_cond_combo. The
vectors are then passed back.
a list with two entries named vec_a/vec_b. The length and names
(if requested) matches with coef(model, select_unique = TRUE). When
input_a and/or input_b is NULL, the respective entry for
vec_a/vec_b will be NULL as well.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.