ewaff.glm.residuals.plot: Plots GLM regression residuals vs fitted values for a CpG...

View source: R/plots.r

ewaff.glm.residuals.plotR Documentation

Plots GLM regression residuals vs fitted values for a CpG site

Description

Plots GLM regression residuals vs fitted values for a CpG site

Usage

ewaff.glm.residuals.plot(variable.of.interest, data, methylation, title)

Arguments

variable.of.interest

Name in colnames(data) for the variable of interest.

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 ~ variable + covariates.

Examples

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)


perishky/ewaff documentation built on Jan. 31, 2024, 11:29 p.m.