.estimateGLM | R Documentation |
This function is called internally by countTest function. You would need to call it directly only in very special cases.
Perform Poisson and Negative Binomial regression analysis to compare the counts from different groups, treatment and control x: vector of counts groups: factor labeling the members from each group Evaluated models are 'Poisson', 'Quasipoisson', 'Neg.Binomial.W', and 'Neg.Binomial'
.estimateGLM(
x,
groups,
baseMV,
w,
MVrate,
test = c("Wald", "LRT"),
p.value = NULL
)
x |
Matrix of counts. |
groups |
Groups information derived from a
|
baseMV |
Mean and variance of group counts. If baseMean >= baseVar*MVrate, then the nonlinear fit to 'Poisson' and 'QuasiPoisson' models are performed, otherwise only the nonlinear fit to 'Neg.Binomial' and 'Neg.Binomial with weights' models are performed |
w |
group weights used in glm procedure |
MVrate |
Minimum Mean/Variance rate. |
test |
A character string matching one of 'Wald' or 'LRT'. If test =
'Wald', then the p-value of the Wald test for the coefficient of the
independent variable (treatment group) will be reported.
If test = 'LRT', then the p-value from a likelihood ratio test given by
|
p.value |
Cut off p-value to reject the null hypothesis |
GLM model of the group comparison for the given genomic region
## Get "RangedGlmDataSet" object
data(ds, package = "MethylIT")
X <- ds$counts[69,]
baseMeanAndVar <- data.frame(baseMean = mean(X),
baseVar = var(X))
MethylIT:::.estimateGLM(x = X, groups = ds$colData$condition,
baseMV = baseMeanAndVar,
w = c(1,1), MVrate = 0.95,
test = "LRT")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.