
Last chance! 50% off unlimited learning
Sale ends in
The marginal_plink
function performs a trait-by-trait univariate test for latent interactions
using the squared residuals and cross products. This function is suitable for large
datasets (e.g., UK Biobank) in plink format. Note that our code to process plink files builds from the
genio
R package.
marginal_plink(y, file, adjustment = NULL, pop_struct = NULL, verbose = TRUE)
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)
path to plink files
matrix of covariates to adjust traits
matrix of PCs that captures population structure
If TRUE (default) print progress.
marginal_plink
# set seed
set.seed(123)
# Path to plink files
file <- system.file("extdata", 'sample.bed', package = "genio", mustWork = TRUE)
# Generate trait expression
Y <- matrix(rnorm(10*4), ncol = 4)
out <- marginal_plink(Y, file = file)
Run the code above in your browser using DataLab