thd.adjust: Principal component-based correction for population structure

Description Usage Arguments Value

View source: R/adjust.R

Description

Generate a matrix of principal components (PCs) significantly associated with THD. Include these PCs in multivariate models to correct for population structure.

Usage

1
thd.adjust(x, H, m, method = "fdr", alpha = 0.05)

Arguments

x

vector of THD values

H

genetic distance matrix used to generate x

m

maximum number of PCs to be considered. Typically, the no. of markers used to generate H.

method

P-value adjustment method passed to p.adjust. Default = false discovery rate (FDR).

alpha

significance threshold to retain a given PC.

Value

Matrix with length(x) rows and one column per PC significantly associated with x. If no PC is found, a 0-column matrix is returned.


rasigadelab/thd documentation built on April 11, 2020, 7:27 a.m.