# Fit some N-mixture models
data(mallard)
mallardUMF <- unmarkedFramePCount(mallard.y, siteCovs = mallard.site,
obsCovs = mallard.obs)
fm1 <- pcount(~ ivel ~ length, mallardUMF)
fm2 <- pcount(~ ivel ~ 1, mallardUMF)
fm3 <- pcount(~ 1 ~ 1, mallardUMF)
## Two methods of creating an unmarkedFitList using fitList()
# Method 1
fmList <- fitList(Global=fm1, ivel.=fm2, Null=fm3)
# Method 2. Note that the arugment name "fits" must be included in call.
models <- list(Global=fm1, ivel.=fm2, Null=fm3)
fmList <- fitList(fits = models)
# Model-averaged prediction
predict(fmList, type="state")
# Model selection
modSel(fmList, nullmod="Null")
Run the code above in your browser using DataLab