Learn R Programming

lit (version 1.0.0)

marginal_plink: 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)

Value

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

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.

See Also

marginal_plink

Examples

Run this code
# 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