Construct an RSA (Representational Similarity Analysis) model
rsa_model.Rd
This function creates an RSA model object by taking an MVPA (Multi-Variate Pattern Analysis) dataset and an RSA design.
Arguments
- dataset
An instance of an
mvpa_dataset
.- design
An instance of an
rsa_design
created byrsa_design()
.
Value
A list with two elements: dataset
and design
, with the class attribute set to "rsa_model"
and "list"
.
Examples
# Create a random MVPA dataset
data <- matrix(rnorm(100 * 100), 100, 100)
labels <- factor(rep(1:2, each = 50))
mvpa_data <- mvpa_dataset(data, labels)
#> Error: train_data does not inherit from class NeuroVec
# Create an RSA design
dismat <- dist(data)
rdes <- rsa_design(~ dismat, list(dismat = dismat))
# Create an RSA model
rsa_mod <- rsa_model(mvpa_data, rdes)
#> Error in eval(expr, envir, enclos): object 'mvpa_data' not found