Description Usage Arguments Details Value Author(s) See Also Examples
Build a model selection table.
1 2 3 4 5 6 7 8 
object 
a fitted model object, a list of such objects, or a

... 
more fitted model objects. 
rank 
optional, custom rank function (returning an information
criterion) to use instead of the default 
rank.args 
optional 
fit 
logical, stating whether the model objects should be refitted if
they are not stored in the 
beta 
indicates whether and how the component models' coefficients
should be standardized. See the argument's description in

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 
model.sel
used with "model.selection"
object will refit model
objects, unless they are stored in object
(in attribute "modelList"
),
if argument extra
is provided, or the requested beta
is different
than object's "beta"
attribute, or the new rank
function
cannot be applied directly to logLik
objects, or new rank.args
are given (unless argument fit = FALSE
).
An object of class c("model.selection", "data.frame")
, being a
data.frame
, where each row represents one model and columns contain
useful information about each model: the coefficients, df, loglikelihood, the
value of the information criterion used,
Δ_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).
See model.selection.object
for its structure.
Kamil Bartoń
dredge
, AICc
, list of supported
models.
Possible alternatives: ICtab
(in package bbmle), or
aictab
(AICcmodavg).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16  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))))

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.