| stats_resample_dm | R Documentation |
Internal methods to generate bootstrap-like intervals for
descriptive statistics derived from either observed data or model
predictions. These methods support both drift_dm objects and
data.frames containing a single participant's observed data.
stats_resample_dm(object, conds, type, b_coding, ..., R, interval_level)
## S3 method for class 'drift_dm'
stats_resample_dm(
object,
conds,
type,
b_coding,
...,
R = 100,
interval_level = 0.95,
n_sim = NULL
)
## S3 method for class 'data.frame'
stats_resample_dm(
object,
conds,
type,
b_coding,
...,
R = 100,
interval_level = 0.95,
progress = 0,
level
)
## S3 method for class 'fits_ids_dm'
stats_resample_dm(
object,
conds,
type,
b_coding,
...,
R = 100,
interval_level = 0.95,
progress = 0,
level
)
object |
a |
conds |
a character vector indicating the condition(s) for which the statistics should be resampled. |
type |
a character string, specifying the |
b_coding |
a list, specifying the boundary coding, required when calculating the statistics. |
... |
additional arguments passed to
|
R |
an integer, number of replications (default is 100). |
interval_level |
a numeric between 0 and 1, controlling the width of the interval (default is 0.95). |
n_sim |
an optional vector, providing the trial numbers for simulating
synthetic data under the model. Only relevant when no observed data is
attached to the model via the |
progress |
an integer, specifying if a progress bar shall be displayed
( |
level |
a character string, specifying at which level resampling shall
take place. |
The stats_resample_dm() generic dispatches to class-specific methods.
For drift_dm objects, it generates synthetic data sets under the model.
For raw data, it resamples observations with replacement (i.e, it performs
a bootstrap). In both cases, statistics from the resampled/generated data are
used to compute intervals for the requested statistic.
Resampling is done for each condition separately.
The function stats_resample_dm() is called within calc_stats().
A stats_dm object with added column Estimate indicating whether the row
represents the lower interval bound, the original value ("orig"), or the
upper interval bound. The interval level can be controlled via the
interval_level argument.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.