residuals: Calculate residuals from a model

residualsR Documentation

Calculate residuals from a model

Description

Calculates residuals from a model. The approach varies based on the model type, but is usually the observed data (y) minus the fitted values. See fitted.

Usage

## S4 method for signature 'unmarkedFit'
residuals(object, ...)

Arguments

object

A unmarkedFit object

...

Other arguments, currently unused.

Value

In most cases, residuals returns a matrix of residual values with the same dimensions as the y matrix (M x J or M x JT). For some models with multiple observation processes or multiple species, such as gdistremoval or occuMulti, the output may be a named list of matrices.


unmarked documentation built on April 3, 2025, 5:30 p.m.