Compute Negative-Binomial residuals
comp_NB_residuals.Rd
Computes the residuals based on the negative binomial model. By default a theta of 100 is used to capture technical variation.
Arguments
- mat
A numerical matrix or coercible to one by `as.matrix()`. Should have row and column names.
- theta
Overdispersion parameter. By default set to 100 as described in Lause and Berens, 2021 (see references).
- clip
logical. Whether residuals should be clipped if they are higher/lower than a specified cutoff
- cutoff
numeric. Residuals that are larger than cutoff or lower than -cutoff are clipped to cutoff.
- freq
logical. Whether a table of frequencies (as used in CA) should be used.