inmoose.edgepy.glmQLFTest

inmoose.edgepy.glmQLFTest(glmfit, coef=None, contrast=None, poisson_bound=True)

Conduct genewise statistical tests for a given coefficient or contrast

Implement one of the quasi-likelihood (QL) methods of [Lund2012], with some enhancements and with slightly different glm, trend and FDR methods. See [Lun2016] or [Chen2016] for tutorials describing the use of glmQLFit() and glmQLFTest() as part of a complete pipeline. Another case study using glmQLFit() and glmQLFTest() is given in Section 4.7 of the edgeR User’s Guide.

glmQLFTest() is similar to glmLRT() except that it replaces likelihood ratio tests with empirical Bayes quasi-likelihood F-tests. The p-values from glmQLFTest() are always greater than or equal to those that would be obtained from glmLRT() using the same negative binomial dispersions.

Note

The negative binomial dispersions dispersion supplied to glmQLFit() and glmQLFTest() must be based on a global model, that is, they must be either trended or common dispersions. It is not correct to supply genewise dispersions because glmQLFTest() estimates genewise variability using the QL dispersion.

Parameters:
  • glmfit (DGEGLM) – a DGEGLM object, usually output from glmQLFit()

  • coeff (int or string array) – indicated which coefficients of the linear model are to be tested equal to zero. Ignored if contrast is not None.

  • contrast (array_like) – vector or matrix specifying one or more contrasts of the linear model coefficients to be tested equal to zero.

  • poisson_bound (bool) – if True then the p-value returned will never be less than would be obtained for a likelihood ratio test with NB dispersion equal to zero.

Returns:

an object of class DGELRT with the same components as produced by glmLRT(), except that the "stat" column of the table contains quasi-likelihood F-statistics. It also stored df_total, an array containing the denominator degrees of freedom for the F-test, equal to df_prior + df_residual_zeros.

Return type:

DGELRT