Learn R Programming

unmarked (version 1.4.3)

fitList: constructor of unmarkedFitList objects

Description

Organize models for model selection or model-averaged prediction.

Usage

fitList(..., fits, autoNames=c("object", "formula"))

Arguments

...

Fitted models. Preferrably named.

fits

An alternative way of providing the models. A (preferrably named) list of fitted models.

autoNames

Option to change the names unmarked assigns to models if you don't name them yourself. If autoNames="object", models in the fitList will be named based on their R object names. If autoNames="formula", the models will instead be named based on their formulas. This is not possible for some model types.

Author

Richard Chandler rbchan@uga.edu

Examples

Run this code
data(linetran)
(dbreaksLine <- c(0, 5, 10, 15, 20)) 
lengths <- linetran$Length * 1000

ltUMF <- with(linetran, {
	unmarkedFrameDS(y = cbind(dc1, dc2, dc3, dc4), 
	siteCovs = data.frame(Length, area, habitat), dist.breaks = dbreaksLine,
	tlength = lengths, survey = "line", unitsIn = "m")
	})

fm1 <- distsamp(~ 1 ~1, ltUMF)
fm2 <- distsamp(~ area ~1, ltUMF)
fm3 <- distsamp( ~ 1 ~area, ltUMF)

## Two methods of creating an unmarkedFitList using fitList()

# Method 1
fmList <- fitList(Null=fm1, .area=fm2, area.=fm3)

# Method 2. Note that the arugment name "fits" must be included in call.
models <- list(Null=fm1, .area=fm2, area.=fm3)
fmList <- fitList(fits = models)

# Extract coefficients and standard errors
coef(fmList)
SE(fmList)

# Model-averaged prediction
predict(fmList, type="state")

# Model selection
modSel(fmList, nullmod="Null")

Run the code above in your browser using DataLab