Simple Permutation Test for Correlation Differences
Source:R/perm_correlation_difference.R
perm_correlation_difference.Rd
Tests whether the correlation of condition effects between ancestries X and Y with a reference ancestry R differs. No bootstrapping or convergence logic.
Usage
perm_correlation_difference(
X,
Y,
R,
MX,
MY,
MR,
g_col,
method = c("pearson", "spearman"),
B = 1000,
seed = NULL
)
Arguments
- X
Matrix of expression values (ancestry 1); samples x genes
- Y
Matrix of expression values (ancestry 2)
- R
Matrix of expression values (reference ancestry)
- MX
Metadata for X; must contain group column
- MY
Metadata for Y
- MR
Metadata for R
- g_col
Column in metadata specifying condition/group (factor with 2 levels)
- method
Correlation method: "pearson" (default) or "spearman"
- B
Number of permutations
- seed
Random seed (optional)