ewaff.glm.residuals.plot | R Documentation |
Plots GLM regression residuals vs fitted values for a CpG site
ewaff.glm.residuals.plot(variable.of.interest, data, methylation, title)
variable.of.interest |
Name in |
data |
Data frame containing all variables. |
methylation |
Vector of methylation levels. |
title |
Title of the plot. |
ggplot |
object showing the scatterplot
of fitted values vs residuals for the model |
methylation <- ... ## methylation matrix
data <- ... ## variable of interest (smoking) and covariates
obj <- ewaff.sites(methylation ~ smoking + ., methylation, data)
cpg <- "cg05575921"
p <- ewaff.glm.residuals.plot("smoking", as.data.frame(object$design), methylation[cpg,], cpg)
print(p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.