Rsq.ad {qpcR}R Documentation

Adjusted R-square value of a fitted model

Description

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

Usage

Rsq.ad(object)

Arguments

object a fitted model.

Details

Calculates the adjusted R^2 by

R_{adj}^2 = 1 - frac{n - 1}{n - p} * (1 - R^2)

with n = sample size, p = number of regressors and R^2 = R-square value.

Value

The adjusted R-square value of the fit.

Author(s)

Andrej-Nikolai Spiess

Examples

## single model
m <- pcrfit(reps, 1, 2, l5)
Rsq.ad(m)

## compare different models with increasing
## number of parameters
ml <- lapply(list(l3, l4, l5), function(x) pcrfit(reps, 1, 2, x))
sapply(ml, function(x) Rsq.ad(x)) 

[Package qpcR version 1.2-4 Index]