Construct a design for an RSA (Representational Similarity Analysis) model
Source:R/rsa_model.R
rsa_design.RdThis function constructs a design for an RSA model using the provided formula, data, and optional parameters.
Usage
rsa_design(
formula,
data,
block_var = NULL,
split_by = NULL,
keep_intra_run = FALSE,
nuisance = list()
)Arguments
- formula
A formula expression specifying the dissimilarity-based regression function.
- data
A named list containing the dissimilarity matrices and any other auxiliary variables.
- block_var
An optional
formula,charactername orintegervector designating the block structure.- split_by
An optional
formulaindicating grouping structure for evaluating test performance.- keep_intra_run
A
logicalindicating whether to include within-run comparisons (default: FALSE).- nuisance
Optional named list of nuisance RDMs or item-level variables using the same accepted forms as entries in
data. These predictors are appended to the RSA model matrix, included in regression fits, and tagged as nuisance sorsa_model(..., return_fingerprint = TRUE)excludes them from model-space fingerprints.
Value
A list with class attributes "rsa_design" and "list", containing:
- formula
The input formula
- data
The input data
- split_by
The split_by formula
- split_groups
Grouping structure for split_by
- block_var
Block structure
- include
Logical vector for including/excluding comparisons
- model_mat
Model matrix generated by rsa_model_mat
- model_predictors
Sanitized names of formula predictors
- nuisance_predictors
Sanitized names of nuisance predictors