Rsq.cor {qpcR}R Documentation

R-square derived from correlation of data and fitted values

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. The value is calculated as a correlation measure. See 'Details'.

Usage

Rsq.cor(object)

Arguments

object a fitted model.

Details

Calculates the R-square by

R_{cor}^2 = cor(y_i, hat{y}_i)^2

Value

The R-square value of the fit.

Author(s)

Andrej-Nikolai Spiess

References

Summarizing the predictive power of a generalized linear model.
B. Zheng & A. Agresti
Statist. Med. (2000), 19: 1771 - 1781.

Examples

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

## compare to 'standard' R-square
Rsq(m) 

[Package qpcR version 1.2-4 Index]