Rsq {qpcR}R Documentation

R-square value of a fitted model

Description

Calculates the R-square value for objects of class nls, lm, glm, drc or any other models from which fitted and residuals can be extracted.

Usage

Rsq(object)

Arguments

object a fitted model.

Details

Uses the most general definition of R-square:

R^2 equiv 1 - frac{RSS}{TSS}

where

RSS = sum_{i=1}^{n}(y_i-hat{y_i})^2

and

TSS = sum_{i=1}^{n}(y_i - bar{y})^2

Value

The R-square value of the fit.

Author(s)

Andrej-Nikolai Spiess

Examples

m <- pcrfit(reps, 1, 2, l5)
Rsq(m)   

[Package qpcR version 1.2-4 Index]