prms_solve<- | R Documentation |
Functions to get or set the "solver settings" of an object. This includes the diffusion constant and the discretization of the time and evidence space.
prms_solve(object, ...) <- value
## S3 replacement method for class 'drift_dm'
prms_solve(object, ..., eval_model = FALSE) <- value
prms_solve(object, ...)
## S3 method for class 'drift_dm'
prms_solve(object, ...)
## S3 method for class 'fits_ids_dm'
prms_solve(object, ...)
object |
an object of type drift_dm or |
... |
additional arguments (i.e., |
value |
a named numeric vector providing new values for the |
eval_model |
logical, indicating if the model should be re-evaluated or
not when updating the solver settings (see re_evaluate_model).
Default is |
prms_solve()
is a generic accessor function, and prms_solve<-()
is a
generic replacement function. The default methods get and set the "solver
settings".
It is possible to update parts of the "solver setttings" (i.e., parts of the
underlying prms_solve
vector). However, modifying "nx"
or "nt"
is not
allowed! Any attempts to modify the respective entries will silently fail
(no explicit error/warning etc. is thrown).
For prms_solve()
the vector prms_solve
(see drift_dm()
).
For prms_solve<-()
the updated drift_dm object.
There is only a replacement function for drift_dm objects. This is
because replacing the solver settings after the model has been fitted (i.e.,
for a fits_ids_dm
object) doesn't make sense.
drift_dm()
# get some default model to demonstrate the prms_solve() functions
my_model <- ratcliff_dm()
# show the discretization and scaling of the model
prms_solve(my_model)
# partially modify these settings
prms_solve(my_model)[c("dx", "dt")] <- c(0.005)
prms_solve(my_model)
# accessor method also available for fits_ids_dm objects
# (see estimate_model_ids)
# get an exemplary fits_ids_dm object
fits <- get_example_fits_ids()
prms_solve(fits)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.