The 'model' class stores information that defines how parameters in a cognitive model are associated with experimental conditions, responses, and other design factors. This object is typically created as part of the model specification process and is used as input to fitting functions or simulation routines.
An object of class 'model', used to configure and fit cognitive decision models to experimental data.
parameter_mapA named list or structure indicating how each model parameter varies with experimental factors (e.g., which parameters depend on which conditions).
accumulatorsA character vector naming the accumulators in the model (e.g., for racing models or diffusion models with multiple response alternatives).
factorsA named list where each element is a factor in the experimental design, and each value is a vector of levels for that factor.
match_mapA list specifying which responses are considered correct or incorrect for each condition. Typically used in decision models to differentiate match/non-match.
constantsA named list of model parameters that are fixed to user-defined values, rather than estimated.
cell_namesA character vector giving the names of each condition cell in the design Boolean array (e.g., 's1.d1.r1', 's1.d1.r2', 's1.d2.r1', etc.), derived from crossing factor levels.
parameter_x_condition_namesA character vector naming how each parameter is associated with particular condition cells.
model_booleanA 3D logical array. Its dimensions are:
slice: accumulators,
row: cells (i.e., conditions),
column: free parameters
, indicating whether a parameter is free to vary for a given accumulator and condition.
pnamesA character vector listing the names of all free parameters in the model.
nparAn integer giving the total number of free parameters in the model.
typeA character string indicating the type of model (e.g., 'fastdm' for the diffusion model described in Voss, Rothermund, and Voss (2004) <doi:10.3758/BF03196893>.)
An object of class 'model' contains the following slots:
This class object encapsulates all necessary mappings and constraints required for model fitting. It is used by the fitting engine to determine which parameters vary, what parameters are fixed, and how each condition affects the model structure.