MuMIn (version 1.43.17)

get.models: Retrieve models from selection table

Description

Generate or extract a list of fitted model objects from a "model.selection" table, optionally using parallel computation in a cluster.

Usage

get.models(object, subset, cluster = NA, ...)

Arguments

object

object returned by dredge.

subset

subset of models, an expression evaluated within the model selection table (see ‘Details’).

cluster

optionally, a "cluster" object. If it is a valid cluster, models are evaluated using parallel computation.

additional arguments to update the models. For example, in lme one may want to use method = "REML" while using "ML" for model selection.

Value

list of fitted model objects.

Details

The argument subset must be explicitely provided. This is to assure that a potentially long list of models is not fitted unintentionally. To evaluate all models, set subset to NA or TRUE.

If subset is a character vector, it is interpreted as names of rows to be selected.

See Also

dredge and pdredge, model.avg

makeCluster in packages parallel and snow

Examples

Run this code
# NOT RUN {
# Mixed models:

# }
# NOT RUN {
fm2 <- lme(distance ~ age + Sex, data = Orthodont,
    random = ~ 1 | Subject, method = "ML")
ms2 <- dredge(fm2)

# Get top-most models, but fitted by REML:
(confset.d4 <- get.models(ms2, subset = delta < 4, method = "REML"))

# }
# NOT RUN {
# Get the top model:
get.models(ms2, subset = 1)[[1]]
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace