Description Usage Arguments Value Author(s)
View source: R/svd_correlator.R
Correlates the principal components with a given confounder. In short, the right singular matrix is correlated column per column with the confounder.
1 2 3 4 5 6 7 | svd_correlator(
evs,
confounder,
alpha_threshold = 0.05,
padj.method = "BH",
title
)
|
evs |
Either the output of SVD: A list containing three outputs: left singular matrix u, vector d and right singular matrix v, or a vector containing an eigen vector matrix obtained from SVD. |
confounder |
A vector containing the confounder of interest. Order and length must be the same as the number of columns in the right singular matrix v. |
alpha |
A value depicting the alpha threshold used for defining significance. If NULL, then no significance will be provided. Defaults to 0.05. |
A scatterplot and data.frame depicting the correlation of the principal components with the confounders.
Andrew Y.F. Li Yim
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.