| re_evaluate_model | R Documentation |
Updates the PDFs of a model. If observed data is available (e.g., via the
obs_data entry or the stats_agg entry; depending on the
cost_function, see also drift_dm()), the
cost_value is also updated.
re_evaluate_model(drift_dm_obj, eval_model = TRUE)
drift_dm_obj |
an object of type drift_dm |
eval_model |
logical, indicating if the model should be evaluated or not.
If |
More in-depth information about the mathematical details for deriving the PDFs can be found in \insertCiteRichteretal.2023;textualdRiftDM
Returns the passed drift_dm_obj object, after (re-)calculating
the PDFs and (if observed data is set) the cost_value.
the PDFs an be addressed via drift_dm_obj$pdfs
the cost_value can be addressed via drift_dm_obj$cost_value
Note that if re_evaluate model is called before observed data was set,
the function silently updates the pdfs, but not cost_value.
drift_dm()
# choose a pre-built model (e.g., the Ratcliff model)
# and set the discretization as needed
my_model <- ratcliff_dm()
# then calculate the model's predicted PDF
my_model <- re_evaluate_model(my_model)
str(my_model$pdfs) # show the structure of the attached pdfs
# if you want the cost_function, make sure some data is attached to the
# model (see also the documentation of obs_data())
obs_data(my_model) <- ratcliff_synth_data # this data set comes with dRiftDM
my_model <- re_evaluate_model(my_model)
str(my_model$pdfs)
print(my_model$cost_value)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.