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

Description Usage Arguments Value Examples

View source: R/Adjusted.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
Adjust(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 adjusted 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
data.whole = cbind(matrix(rnorm(500),nrow=50), rbinom(50,1,0.5))
RNA_tmp <- rpois(50,15)
Adjust(data.whole, RNA_tmp, alpha = 0.5, nfolds = 5, clin = clinical)

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