Learn R Programming

qpcR (version 1.3-7.1)

resVar: Residual variance of a fitted model

Description

Calculates the residual variance for objects of class nls, lm, glm, drc or any other models from which coef and residuals can be extacted.

Usage

resVar(object)

Arguments

object
a fitted model.

Value

  • The residual variance of the fit.

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.

Examples

Run this code
m1 <- pcrfit(reps, 1, 2, l5)
resVar(m1)

Run the code above in your browser using DataLab