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

View source: R/methods.drc.R

deviance.drcR Documentation

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 class 'drc'
deviance(object, ...)

Arguments

object

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

...

Other additional arguments, if necessary

Value

The value of the deviance extracted from the object object.

Author(s)

Andrea Onofri

Examples

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)

OnofriAndreaPG/aomisc documentation built on Feb. 26, 2024, 8:21 p.m.