marginal {lit} | R Documentation |
Marginal (SQ/CP) approach
Description
The marginal
function performs a trait-by-trait univariate test for latent interactions
using the squared residuals and cross products.
Usage
marginal(y, x, adjustment = NULL, pop_struct = NULL)
Arguments
y |
matrix of traits (n observations by k traits) |
x |
matrix of SNPs (n observations by m SNPs) |
adjustment |
matrix of covariates to adjust traits |
pop_struct |
matrix of PCs that captures population structure |
Value
A data frame of p-values where the columns are the cross products/squared residuals and the rows are SNPs.
See Also
Examples
# set seed
set.seed(123)
# Generate SNPs and traits
X <- matrix(rbinom(10*2, size = 2, prob = 0.25), ncol = 2)
Y <- matrix(rnorm(10*4), ncol = 4)
out <- marginal(Y, X)
[Package lit version 1.0.0 Index]