merge.model.selection: Combine model selection tables

merge.model.selectionR Documentation

Combine model selection tables

Description

Combine two or more model selection tables.

Usage

## S3 method for class 'model.selection'
merge(x, y, suffixes = c(".x", ".y"), ...)

## S3 method for class 'model.selection'
rbind(..., deparse.level = 1, make.row.names = TRUE)

Arguments

x, y, ...

model.selection objects to be combined. (... ignored in merge)

suffixes

a character vector with two elements that are appended respectively to row names of the combined tables.

make.row.names

logical indicating if unique and valid row.names should be constructed from the arguments.

deparse.level

ignored.

Value

A "model.selection" object containing models (rows) from all provided tables.

Note

Both Δ_IC values and Akaike weights are recalculated in the resulting tables.

Models in the combined model selection tables must be comparable, i.e. fitted to the same data, however only very basic checking is done to verify that. The models must also be ranked by the same information criterion.

Unlike the merge method for data.frame, this method appends second table to the first (similarly to rbind).

Author(s)

Kamil Bartoń

See Also

dredge, model.sel, merge, rbind.

Examples

## Not run: 
require(mgcv)

ms1 <- dredge(glm(Prop ~ dose + I(dose^2) + log(dose) + I(log(dose)^2),
    data = Beetle, family = binomial, na.action = na.fail))
	
fm2 <- gam(Prop ~ s(dose, k = 3), data = Beetle, family = binomial)

merge(ms1, model.sel(fm2))

## End(Not run)

MuMIn documentation built on June 22, 2024, 6:44 p.m.