Learn R Programming

MuMIn (version 1.10.5)

model.sel: model selection table

Description

Build a model selection table.

Usage

model.sel(object, ...)
## S3 method for class 'model.selection':
model.sel(object, rank = NULL, rank.args = NULL, ..., beta = FALSE, extra)
## S3 method for class 'default':
model.sel(object, ..., rank = NULL, rank.args = NULL, beta = FALSE, extra)

Arguments

object
A fitted model object, a list of such objects, or a "model.selection" object.
...
More fitted model objects.
rank
Optional, custom rank function (information criterion) to use instead of AICc, e.g. QAIC or BIC, may be omitted if object is a model list returned by get.models.
rank.args
Optional list of arguments for the rank function. If one is an expression, an x within it is substituted with a current model.
beta
logical, should standardized coefficients be returned?
extra
optional additional statistics to include in the result, provided as functions, function names or a list of such (best if named or quoted). See dredge for details.

Value

  • An object of class "model.selection" with columns containing useful information about each model: the coefficients, df, log-likelihood, the value of the information criterion used, latex{$\Delta_{IC}$}{Δ{Delta}_IC} and Akaike weight. If any arguments differ between the modelling function calls, the result will include additional columns showing them (except for formulas and some other arguments).

encoding

utf-8

See Also

dredge, AICc, list of supported models.

Possible alternatives: ICtab (in package bbmle), or aictab (AICcmodavg).

Examples

Run this code
data(Cement)
Cement$X1 <- cut(Cement$X1, 3)
Cement$X2 <- cut(Cement$X2, 2)

fm1 <- glm(formula = y ~ X1 + X2 * X3, data = Cement)
fm2 <- update(fm1, . ~ . - X1 - X2)
fm3 <- update(fm1, . ~ . - X2 - X3)

## ranked with AICc by default
(msAICc <- model.sel(fm1, fm2, fm3))

## ranked with BIC
model.sel(fm1, fm2, fm3, rank = AIC, rank.args = alist(k = log(nobs(x))))
# or
# model.sel(msAICc, rank = AIC, rank.args = alist(k = log(nobs(x))))
# or
# update(msAICc, rank = AIC, rank.args = alist(k = log(nobs(x))))

Run the code above in your browser using DataLab