Learn R Programming

statforbiology (version 0.9.9)

R2nls: Goodness of fit for nonlinear regression

Description

This function calculates measures of goodness of fit for nonlinear regression. It works with both 'nls' and 'drc' objects

Usage

R2nls(object)

Value

A list with the following slots:

R2

Traditional coefficient of determination, calculated as the ratio of model SS to total SS. Formula as in Schabenberger and Pierce, 5.23, pag 211.

PseudoR2

Pseudo-R2, more useful for nonlinear regression with no-intercept-models. Formula Formula as in Schabenberger and Pierce, 5.24, pag 212.

R2adj

Adjusted R2, similar to R2 above, but penalised for higher number of parameters.

MSE

Mean Squared Error

RMSE

Root Means Squared Error

RRMSE

Relative Root Means Squared Error

Arguments

object

A nonlinear regression fit object. It can be either a 'nls' fit or 'drm' fit.

Author

Andrea Onofri

References

Schabenberger, O., Pierce, F.J., 2002. Contemporary statistical models for the plant and soil sciences. Taylor & Francis, CRC Press, Books.

Examples

Run this code
data(beetGrowth)
mod3 <- nls(weightInf ~ NLS.L3(DAE, b, c, d), data = beetGrowth)
R2nls(mod3)

mod4 <- drm(weightInf ~ DAE, fct = L.3(), data = beetGrowth)
R2nls(mod4)

Run the code above in your browser using DataLab