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

Description Usage Arguments Details Value Author(s) Examples

View source: R/highmed.R

Description

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

Usage

1
multivariate_EWAS(X, Y, M, K, covar = 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.

covar

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:

- U the latent variable score matrix with dimensions n x K.

- B the effect size matrix for the exposure X and the outcome Y.

- score matrix for the exposure X and the outcome Y.

- pValue matrix for the exposure X and the outcome Y.

- calibrated.score2, the calibrated score matrix for the exposure X and the outcome Y.

- calibrated.pvalue, the calibrated pValue matrix for the exposure X and the outcome Y.

- GIF : Genomic Inflation Factor for exposure and outcome

Author(s)

Basile Jumentier

Examples

1
2
3
4
5
library(highmed)

# Run multivariate_EWAS

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

jumentib/highmed documentation built on Sept. 3, 2020, 2 p.m.