deviance(object, ...) ## Default S3 method: deviance(object, ...) ## S3 method for class 'glm': deviance(object, ...) ## S3 method for class 'lm': deviance(object, ...) ## S3 method for class 'mlm': deviance(object, ...) ## S3 method for class 'nls': deviance(object, ...)
object | a fitted model object. |
... | additional arguments to be passed to or from future functions. |
x <- c(1,2,3) y <- c(4,2,8) lm.fit <- lm(y~x) deviance(lm.fit)glm.fit <- glm(area ~ ., family = poisson, data = rock) deviance(glm.fit)
Micmen <- data.frame( conc=c(0.333, 0.167, 0.0833, 0.0416, 0.0208, 0.0104, 0.0052), vel=c(3.636, 3.636, 3.236, 2.666, 2.114, 1.466, 0.866)) nls.fit <- nls(vel~Vm*conc/(K+conc), data = Micmen, start = list(K = 0.02, Vm = 3.7), trace = TRUE, model = TRUE, weights = c(1:4,3:1)/7) deviance(nls.fit)