rsa_design: Construct a design for an RSA (Representational Similarity...

View source: R/rsa_model.R

rsa_designR Documentation

Construct a design for an RSA (Representational Similarity Analysis) model

Description

This 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
)

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, character name or integer vector designating the block structure.

split_by

An optional formula indicating grouping structure for evaluating test performance.

keep_intra_run

A logical indicating whether to exclude within-run comparisons.

Details

The function creates an RSA design based on the input parameters. It checks the validity of the input data and handles splitting conditions for evaluation of test performance. It also processes optional block structures and within-run comparisons.

Value

A list containing the elements of the RSA design, with class attributes "rsa_design" and "list".

Examples

dismat <- dist(matrix(rnorm(100*100), 100, 100))
rdes <- rsa_design(~ dismat, list(dismat=dismat))

bbuchsbaum/rMVPA documentation built on April 23, 2024, 7:35 a.m.