rsa {calmr}R Documentation

Perform representational similarity analysis

Description

Perform representational similarity analysis

Usage

rsa(x, comparisons, test = FALSE, ...)

Arguments

x

A list of CalmrExperiment objects

comparisons

A model-named list containing the model outputs to compare.

test

Whether to test the RSA via permutation test. Default = FALSE.

...

Additional parameters passed to stats::dist() and stats::cor()

Value

A CalmrRSA object

Note

The object returned by this function can be later tested via its own test() method.

Examples

# Comparing the associations in three models
exp <- data.frame(
  Group = c("A", "B"),
  P1 = c("2(A)>(US)/1B>(US)", "1(A)>(US)/2B>(US)"),
  R1 = TRUE
)
models <- c("HD2022", "RW1972", "PKH1982")
parameters <- sapply(models, get_parameters, design = exp)
exp_res <- compare_models(exp,
  models = models
)
comparisons <- list(
  "HD2022" = c("vs"),
  "RW1972" = c("vs"),
  "PKH1982" = c("eivs")
)
res <- rsa(exp_res, comparisons = comparisons)
test(res, n_samples = 20)

[Package calmr version 0.6.1 Index]