ZlmFit-class {MAST} | R Documentation

## An S4 class to hold the output of a call to zlm

### Description

This holds output from a call to zlm. Many methods are defined to operate on it. See below.

### Usage

    ## S4 method for signature 'ZlmFit,CoefficientHypothesis'
    lrTest(object, hypothesis)

    ## S4 method for signature 'ZlmFit,Hypothesis'
    lrTest(object, hypothesis)

    ## S4 method for signature 'ZlmFit,matrix'
    lrTest(object, hypothesis)

    ## S4 method for signature 'ZlmFit,CoefficientHypothesis'
    waldTest(object, hypothesis)

    ## S4 method for signature 'ZlmFit,Hypothesis'
    waldTest(object, hypothesis)

    ## S4 method for signature 'ZlmFit'
    coef(object, which, ...)

    ## S4 method for signature 'ZlmFit'
    vcov(object, which, ...)

    ## S4 method for signature 'ZlmFit'
    se.coef(object, which, ...)

### Arguments

`object` | `ZlmFit`
`hypothesis` | call to Hypothesis or CoefficientHypothesis or a matrix giving such contrasts.
`which` | character vector, one of "C" (continuous) or "D" (discrete) specifying which component should be returned
`...` | ignored

### Value

see "Methods (by generic)"

### Methods (by generic)

- `lrTest`: Returns an array with likelihood-ratio tests on contrasts defined using `CoefficientHypothesis()`.

- `lrTest`: Returns an array with likelihood-ratio tests specified by `Hypothesis`, which is a Hypothesis.

- `lrTest`: Returns an array with likelihood-ratio tests specified by `Hypothesis`, which is a contrast `matrix`.

- `waldTest`: Returns an array with Wald Tests on contrasts defined using `CoefficientHypothesis()`.

- `waldTest`: Returns an array with Wald Tests on contrasts defined in `Hypothesis()`

- `coef`: Returns the matrix of coefficients for component `which`.

- `vcov`: Returns an array of variance/covariance matrices for component `which`.

- `se.coef`: Returns a matrix of standard error estimates for coefficients on component `which`.

### Slots

`coefC`

  matrix of continuous coefficients

`coefD`

  matrix of discrete coefficients

`vcovC`

  array of variance/covariance matrices for coefficients

`vcovD`

  array of variance/covariance matrices for coefficients

`LMlike`

  the LmWrapper object used

`sca`

  the `SingleCellAssay` object used

`deviance`

  matrix of deviances

`loglik`

  matrix of loglikelihoods

`df.null`

  matrix of null (intercept only) degrees of freedom

`df.resid`

  matrix of residual DOF

`dispersion`

  matrix of dispersions (after shrinkage)

`dispersionNoShrink`

  matrix of dispersion (before shrinkage)

`priorDOF`

  shrinkage weight in terms of number of psuedo-obs

`priorVar`

  shrinkage target

`converged`

  output that may optionally be set by the underlying modeling function

`hookOut`

  a list of length ngenes containing output from a hook function, if `zlm` was called with one

### See Also

zlm summary,ZlmFit-method

### Examples

    data(vbetaFA)
    zlmVbeta <- zlm(~ Stim.Condition+Population, subset(vbetaFA, ncells==1)[1:10,])
    #Coefficients and standard errors
    coef(zlmVbeta, 'D')
    coef(zlmVbeta, 'C')
    se.coef(zlmVbeta, 'C')
    #Test for a Population effect by dropping the whole term (a 5 degree of freedom test)
    lrTest(zlmVbeta, 'Population')
    #Test only if the VbetaResponsive cells differ from the baseline group
    lrTest(zlmVbeta, CoefficientHypothesis('PopulationVbetaResponsive'))
    # Test if there is a difference between CD154+/Unresponsive and CD154-/Unresponsive.
    # Note that because we parse the expression
    # the columns must be enclosed in backquotes
    # to protect the \quote{+} and \quote{-} characters.
    lrTest(zlmVbeta, Hypothesis('`PopulationCD154+VbetaUnresponsive` -
            `PopulationCD154-VbetaUnresponsive`'))
    waldTest(zlmVbeta, Hypothesis('`PopulationCD154+VbetaUnresponsive` -
            `PopulationCD154-VbetaUnresponsive`'))

[Package MAST version 1.10.0 Index]