Skip to contents

Forms an ROI x ROI similarity matrix by correlating lower-triangle predicted RDM vectors across ROIs. Sparsification, when requested, is applied only to the final ROI x ROI matrix and never to the per-ROI RDM vectors themselves.

Usage

feature_rsa_connectivity(
  x,
  method = c("spearman", "pearson"),
  keep = 1,
  absolute = FALSE,
  use = "pairwise.complete.obs"
)

Arguments

x

Either a regional_mvpa_result produced by feature_rsa_model(..., return_rdm_vectors=TRUE) or the tibble returned by feature_rsa_rdm_vectors().

method

Correlation method used across ROI RDM vectors, one of "spearman" or "pearson".

keep

Proportion of ROI-ROI edges to retain after optional sparsification. keep = 1 disables sparsification. For example, keep = 0.1 retains the top 10% of finite off-diagonal edges.

absolute

Logical; when TRUE, rank edges by absolute magnitude during sparsification. Defaults to FALSE.

use

Missing-value handling passed to cor.

Value

A symmetric numeric matrix with ROIs in rows/columns.

Examples

if (FALSE) { # \dontrun{
vecs <- feature_rsa_rdm_vectors(res)
conn <- feature_rsa_connectivity(vecs, method = "spearman", keep = 0.1)
} # }