svd_correlator: svd_correlator

Description Usage Arguments Value Author(s)

View source: R/svd_correlator.R

Description

Correlates the principal components with a given confounder. In short, the right singular matrix is correlated column per column with the confounder.

Usage

1
2
3
4
5
6
7
svd_correlator(
  evs,
  confounder,
  alpha_threshold = 0.05,
  padj.method = "BH",
  title
)

Arguments

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.

Value

A scatterplot and data.frame depicting the correlation of the principal components with the confounders.

Author(s)

Andrew Y.F. Li Yim


ND91/ndlib documentation built on Aug. 10, 2020, 11:59 a.m.