A component is one model with its own population values, trials, tasks,
generator and formula. simulate_components() simulates several of them
for the same people, so that parameters of different models can be
correlated across subjects, and fit_components() fits each on its own.
Usage
recovery_component(
model,
pars,
n_trials,
sds = NULL,
tasks = NULL,
task_col = "task",
trial_design = NULL,
generator = NULL,
formula = NULL,
name
)Arguments
- model
A
bmmodel, built with the column names the fit will use.- pars, n_trials, sds, tasks, task_col, trial_design, generator
As in
simulate_recovery(), for this component.parsandsdsmay be functions with no arguments, evaluated bysimulate_components()under its seed.- formula
NULL, or thebmmformulafit_components()fits this component with.NULLusesrecovery_formula()with the task column when there are tasks. A customm3needs it, and its built-in generator reads the activation formulas from it (seesimulate_recovery()).- name
The component's name, which prefixes its terms:
name = "m3"turnsc_task1intom3_c_task1. A single syntactic name without_or., unique within a set.
Value
A list of class bmmtools_component with the arguments as
validated; tasks and task_col are NULL without tasks.
Details
What can be checked without drawing is checked here: the model, the
number of trials, the tasks, that a generator exists and takes the
trial design, the trial design against n_trials, the formula, and
numeric pars and sds against the model. Correlations and covariates
belong to the set and are given to simulate_components().
