Description Usage Arguments Details Value Author(s) Examples
This function uses lfmm (latent factor mixed models) to estimate the effects of exposures and outcomes on a response matrix.
1 | multivariate_EWAS(X, Y, M, K, covar = NULL)
|
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. |
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.
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
Basile Jumentier
1 2 3 4 5 | library(highmed)
# Run multivariate_EWAS
res <- multivariate_EWAS(X = example$X, Y = example$Y, M = example$M, K = 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.