Learn R Programming

statforbiology (version 0.9.9)

deviance.drc: Residual deviance for a non-linear regression fit.

Description

Calculate the sum of squared residuals from a non-linear regression fit with the 'drm()' function in the 'drc()' package.

Usage

# S3 method for drc
deviance(object, ...)

Value

The value of the deviance extracted from the object object.

Arguments

object

a 'drc' object, for which the deviance is required

...

Other additional arguments, if necessary

Author

Andrea Onofri

Examples

Run this code
X <- c(1, 3, 5, 7, 9, 11, 13, 20)
Y <- c(8.22, 14.0, 17.2, 16.9, 19.2, 19.6, 19.4, 19.6)

# nls fit
model <- nls(Y ~ NLS.asymReg(X, init, m, plateau) )
deviance(model)

# drm fit
model2 <- drm(Y ~ X, fct = DRC.asymReg())
deviance(model2)

Run the code above in your browser using DataLab