powered by
The marginal function performs a trait-by-trait univariate test for latent interactions using the squared residuals and cross products.
marginal
marginal(y, x, adjustment = NULL, pop_struct = NULL)
A data frame of p-values where the columns are the cross products/squared residuals and the rows are SNPs.
matrix of traits (n observations by k traits)
matrix of SNPs (n observations by m SNPs)
matrix of covariates to adjust traits
matrix of PCs that captures population structure
marginal_plink
# 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)
Run the code above in your browser using DataLab