re_evaluate_model | R Documentation |
Updates the PDFs of a model. If obs_data are set to the model, the log-likelihood 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 log-likelihood.
the PDFs an be addressed via drift_dm_obj$pdfs
the log-likelihood can be addressed via drift_dm_obj$log_like_val
Note that if re_evaluate
model is called before observed data was set,
the function silently updates the pdfs
, but not log_like_val
.
drift_dm()
# choose a pre-built model (e.g., the Ratcliff model)
# and set the discretization as needed
my_model <- ratcliff_dm(t_max = 1.5, dx = .005, dt = .005)
# 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 log_likelihood, 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$log_like_val)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.