residuals.gllvm: Dunn-Smyth -residuals for gllvm model
Description
Calculates Dunn-Smyth -residuals for gllvm model.
Usage
# S3 method for gllvm
residuals(object, ...)
Arguments
object
an object of class 'gllvm'.
...
not used.
Value
A list containing residuals which is a matrix of residuals and linpred which is a matrix of linear predictors.
Details
Computes Dunn-Smyth residuals or randomized quantile residuals (Dunn and Smyth, 1996) for gllvm model.
For the observation \(Y_{ij}\) Dunn-Smyth residuals are defined as
where \(\Phi(.)\) and \(F_{ij}(.)\) are the cumulative probability functions of the standard normal
distribution, \(F_{ij}^-(y))\) is the limit as \(F_{ij}(y)\) is approached from the negative side, and \(u_{ij}\) has been
generated at random from the standard uniform distribution.
References
Dunn, P. K., and Smyth, G. K. (1996). Randomized quantile residuals. Journal of Computational and Graphical Statistics, 5, 236-244.
Hui, F. K. C., Taskinen, S., Pledger, S., Foster, S. D., and Warton, D. I. (2015). Model-based approaches to unconstrained ordination. Methods in Ecology and Evolution, 6:399-411.
# NOT RUN {# Load a dataset from the mvabund packagedata(antTraits)
y <- as.matrix(antTraits$abund)
# Fit gllvm modelfit <- gllvm(y = y, family = "poisson")
# residualsres <- residuals(fit)
# }