marginal_plink {lit}R Documentation

Marginal (SQ/CP) approach

Description

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.

Usage

marginal_plink(y, file, adjustment = NULL, pop_struct = NULL, verbose = TRUE)

Arguments

y

matrix of traits (n observations by k traits)

file

path to plink files

adjustment

matrix of covariates to adjust traits

pop_struct

matrix of PCs that captures population structure

verbose

If TRUE (default) print progress.

Value

A data frame of p-values where the columns are the cross products/squared residuals and the rows are SNPs.

See Also

marginal_plink

Examples

# 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)


[Package lit version 1.0.0 Index]