Skip to content

Support for passing hypothesis to doLRT in summary() as in lrTest() #171

@ImNotaGit

Description

@ImNotaGit

This is a (hopefully) minor feature request.

I am using the development version of the package. lrTest supports passing numerous different types of objects for the argument hypothesis, according to the document: "hypothesis can be one of a character giving complete factors or terms to be dropped from the model, CoefficientHypothesis giving names of coefficients to be dropped, Hypothesis giving contrasts using the symbolically, or a contrast matrix." However, when called via summary(zlmfit, doLRT), the doLRT argument can only be a character vector of coefficients to drop in the reduced model. It would be very helpful to also support the multiple argument types for doLRT in summary as those for hypothesis in lrTest.

My use case is as follows: I was exploring a series of somewhat complex nested design models, and I was not confident that I got the design matrix correct every time. After considering the experimental designs and questions of interests, I decided to instead create a new factor for combinations of all levels of the factors under consideration, provide an intercept-free model including only this new factor to zlm, and then obtain log fold-change values for a customized comparison via getLogFC(zlmfit, contrast0, contrast1) specifying both the contrast0 and contrast1 arguments. I was able to include such customized logFC in summary via summary(zlmfit, logFC=getLogFC(zlmfit, contrast0, contrast1)), and I also wanted to perform LR test to get P values exactly corresponding to the customized comparison. But with the current doLRT argument only accepting a character vector of coefficients I was not able to specify the test I needed.

Thanks for your help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions