mEWAS: Epigenome Wide Association Study with both exposure and...

Description Usage Arguments Details Value Author(s) Examples

View source: R/hdmax2.R

Description

This function uses lfmm (latent factor mixed models) to estimate the effects of exposures and outcomes on a response matrix.

Usage

1
mEWAS(X, Y, M, K, conf = NULL)

Arguments

X

an explanatory variable matrix with n rows and d columns. Each column corresponds to a distinct explanatory variable (Exposure). Explanatory variables must be encoded as numeric variables.

Y

an explanatory variable matrix with n rows and d columns. Each column corresponds to a distinct explanatory variable (Outcome). Explanatory variables must be encoded as numeric variables.

M

a response variable matrix with n rows and p columns. Each column corresponds to a beta-normalized methylation profile. Response variables must be encoded as numeric. No NAs allowed.

K

an integer for the number of latent factors in the regression model.

conf

set of covariable, must be numeric.

Details

The response variable matrix Y and the explanatory variable are centered. Missing values must be imputed. The number of latent factors can be estimated by looking at the screeplot of eigenvalues of a PCA. Possibility of calibrating the scores and pValues by the GIF (Genomic Inflation Factor). See lfmm package for more information.

Value

an object with the following attributes:

Author(s)

Basile Jumentier

Examples

1
2
3
4
5
library(hdmax2)

# Run mEWAS

res <- mEWAS(X = example$X, Y = example$Y, M = example$M, K = 5)

jumentib/hdmax2 documentation built on Feb. 25, 2022, 12:58 p.m.