extractAIC(fit, scale, k = 2, ...) ## S3 method for class 'glm': extractAIC(fit, scale = 0, k = 2, ...) ## S3 method for class 'lm': extractAIC(fit, scale = 0, k = 2, ...)
fit | object inheriting from fitted model or class. |
scale | a numeric number, indicates the scale of deviance for linear model. |
k | a numeric number, the coefficient for residual degrees of freedom. |
... | additional arguments to be pass to future functions. |
ldose <- rep(0:5, 2) numdead <- c(1, 4, 9, 13, 18, 20, 0, 2, 6, 10, 12, 16) sex <- factor(rep(c("M", "F"), c(6, 6))) SF <- cbind(numdead, numalive = 20 - numdead) budworm.lg <- glm(SF ~ sex*ldose, family = binomial) extractAIC(budworm.lg)lm.fit <- lm(y ~ ., data=Sdatasets::freeny) extractAIC(lm.fit)
P <- ordered(rep(1:3, rep(3,3))) N <- ordered(rep(1:3,3)) Plants <- c(449, 413, 326, 409, 358, 291, 341, 278, 312) Plants <- Plants/12 fit.df <- data.frame(Plants, P, N) fit.aov <- aov(Plants ~ N * P, data = fit.df, weights = rep(12,9), qr = TRUE) extractAIC(fit.aov)