Interact: Function for associating race adjusted DNA methylation with...

Description Usage Arguments Value Examples

View source: R/Interaction.R

Description

This function allows one to associate DNA methylation with matched mRNA expression in a multivariate context while adjusting for race. This function assumes that the variable 'race' is the final column in the matrix.

Usage

1
Interact(x, y, alpha, nfolds, clin)

Arguments

x

Processed DNA methylation with covariates. Race must be the final term

y

Raw expression count vector

alpha

Elastic net mixing penalty. Defaults to 0.5

nfolds

the number of folds to use for cross-validation

clin

a matrix of clinical covariates

Value

returns list of five elements for summarizing model construction. Model is the predicted model for the gene. Predicted.Expression is the Cross-validated predicted expression. Overall.D2 The prediction accuracy for the interaction model. Class1.D2 is the prediction accuracy for the reference class. Class2.D2 is the prediction accuracy for the non-reference class.

Examples

1
2
3
4
5
data("Testdat", package = 'EpiXprS')
x = cbind(matrix(rnorm(500),nrow=50),rbinom(50,1,0.5) ,rbinom(50,1,0.5))
colnames(data.whole) <- c(1:10,'sex','race')
RNA_idx <- rpois(50,15)
Interact(data.whole, RNA_idx, alpha = 0.5, nfolds = 5, clin = clinical)

iloveless1/EPIExPRS documentation built on Dec. 20, 2021, 6:55 p.m.