Calculates the residual variance for objects of class nls, lm, glm, drc or any other models from which coef and residuals can be extracted.
Usage
resVar(object)
Value
The residual variance of the fit.
Arguments
object
a fitted model.
Author
Andrej-Nikolai Spiess
Details
$$resVar = \frac{\sum_{i=1}^n(y_i - \hat{y}_i)^2}{n - p}$$
where \(n\) is the number of response values and \(p\) the number of parameters in the model.