binomRegMethModelPred: A smoothed-EM algorithm to estimate covariate effects and...

View source: R/binomRegMethModelPred.R

binomRegMethModelPredR Documentation

A smoothed-EM algorithm to estimate covariate effects and test regional association in Bisulfite Sequencing-derived methylation data

Description

This function returns the predicted methylation levels

Usage

binomRegMethModelPred(
  BEM.obj,
  newdata = NULL,
  type = "proportion",
  verbose = TRUE
)

Arguments

BEM.obj

an output from the function binomRegMethModel

newdata

the data set whose predictions are calculated; with columns 'Position', covariate names matching the BEM.obj

type

return the predicted methylation proportion or the predicted response (in logit or other binom.link scale)

verbose

logical indicates if the algorithm should provide progress report information. The default value is TRUE.

Value

This function returns the predicted methylation levels

Author(s)

Kaiqiong Zhao

Examples

#------------------------------------------------------------#
data(RAdat)
RAdat.f <- na.omit(RAdat[RAdat$Total_Counts != 0, ])
out <- binomRegMethModel(
  data=RAdat.f, n.k=rep(5, 3), p0=0.003307034, p1=0.9,
  epsilon=10^(-6), epsilon.lambda=10^(-3), maxStep=200,
  Quasi = FALSE, RanEff = FALSE
)
binomRegMethModelPred(out)

kaiqiong/SOMNiBUS documentation built on June 3, 2022, 9:16 a.m.