Compute Cross-Connectivity: Predicted-Observed ROI x ROI Matrix
Source:R/feature_rsa_connectivity.R
feature_rsa_cross_connectivity.RdBuilds an asymmetric ROI x ROI matrix where entry (i, j) is the correlation between the predicted RDM vector of ROI i and the observed RDM vector of ROI j. This captures how well the model-predicted representational geometry in one ROI matches the data-driven geometry in another.
Arguments
- x
Either a
regional_mvpa_resultproduced byfeature_rsa_model(..., return_rdm_vectors=TRUE)or the tibble returned byfeature_rsa_rdm_vectors().- method
Correlation method, one of
"spearman"or"pearson".- adjust
Optional adjustment for ROI-level source/target offsets. Use
"none"(default) to return the raw ROI x ROI correlation matrix,"double_center"to subtract additive source and target main effects from that matrix, or"residualize_mean"to remove the grand-mean RDM component from predicted and observed ROI vectors before computing the cross-correlation.- return_components
Logical; if
TRUE, return a list containing the requested matrix, the raw matrix, the adjusted matrix, and the source and target offset terms estimated from the raw matrix.- use
Missing-value handling passed to
cor.
Value
By default, a numeric matrix of dimension n_ROI x n_ROI. Rows
correspond to predicted RDM vectors and columns to observed RDM vectors.
The matrix is not necessarily symmetric. If
return_components = TRUE, a list is returned with elements
matrix, raw_matrix, adjusted_matrix,
source_offset, target_offset, grand_mean,
method, and adjust.
Examples
if (FALSE) { # \dontrun{
res <- run_regional(
feature_rsa_model(dataset, design, method = "pls", return_rdm_vectors = TRUE),
region_mask
)
cross_conn <- feature_rsa_cross_connectivity(res, method = "spearman")
cross_dc <- feature_rsa_cross_connectivity(
res,
method = "spearman",
adjust = "double_center"
)
} # }