F.cr.model.avg: F.cr.model.avg - Model averaging of mark-recapture...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Computes model averaged estimates of survival, capture probability, or population size estimates from a set of previously fitted MRA objects.

Usage

1
F.cr.model.avg( fits=ls(pattern="^fit"), what="survival", fit.stat="qaicc" )

Arguments

fits

A character vector of MRA fitted object names. Each will be retrieved from the global environment (i.e., .GlobalEnv) using get and tested to make sure they are MRA fitted objects. If not, a warning is issued and the object is ignored. If the object is an MRA model, it is included in model averaging. The default value will use any object whose name starts with "fit". For example, if fitted objects are named "fit1.01", "fit1.02", and "fit1.03", fits equal to c("fit1.01", "fit1.02", "fit1.03") or ls(pat="^fit1"), will average statistics in these three objects.

what

A text string naming the parameter to average. Choices are "survival" (the default), "capture", and "n.hat". Only the first character is inspected (e.g., "c" is equivalent to "capture").

fit.stat

A string (scalar) naming the model fit statistic to use when computing model weights. Possible values are: "qaicc" (the default), "qaic", "aicc", and "aic".

Details

Each model is checked for convergence prior to including in the model averaging process. The test for whether a model converged is (fit$exit.code == 1) & (fit$cov.code == 0) & (fit$df > 0), where fit is the fitted object. If the model did not converge, it is excluded from model averaging.

Conditional and unconditional variance estimates are computed following Burnham and Anderson 2002 (pages 150 and 162 and surrounding).

If what = "n.hat", the returned object is suitable for printing using print.nhat and plotting using plot.cjs. If what = "survival" or "capture", the returned object is unclassed and the user is responsible for printing and plotting.

Value

If what = "survival" or "capture", the return is a list object containing the following components:

fit.table

A data frame, sorted by fit.stat, containing model names, fit statistics, delta fit statistics, and model averaging weights.

s.hat or p.hat

A matrix of size nan X ns containing model averaged estimates of survival or capture probability.

se.s.hat or se.p.hat

A matrix of size nan X ns containing the unconditional (on model selection) estimate of standard error for the corresponding model averaged statistic in s.hat or p.hat. Unconditional variances are computed using formulas in Burnham and Anderson (2002, pages 150 and 162)

se.s.hat.conditional or se.p.hat.conditional

A matrix of size nan X ns containing the conditional estimate of standard error for the corresponding model averaged statistic in s.hat or p.hat. These estimates of variance are conditional on model selection.

mod.selection.proportion

A matrix of size nan X ns containing the proportion of variance due to model selection uncertainty. Values in this matrix are simply the difference between unconditional variance and conditional variance, divided by the unconditional variance.

If what = "n.hat", the return is a list of class "n.hat" containing the following components:

fit.table

A data frame, sorted by fit.stat, containing model names, fit statistics, delta fit statistics, and model averaging weights.

n.hat

A vector of length ns containing model averaged estimates of population size.

se.n.hat

A vector of length ns containing the unconditional (on model selection) estimate of standard error for the corresponding model averaged population size.

se.n.hat.conditional

A vector of length ns containing the conditional estimate of standard error for the corresponding model averaged population size.

mod.selection.proportion

A vector of lengthns containing the proportion of variance due to model selection uncertainty. Values in this matrix are simply the difference between unconditional variance and conditional variance, divided by the unconditional variance.

n.hat.lower

A vector of length ns containing lower 95% confidence limits for the corresponding population size estimate.

n.hat.upper

A vector of length ns containing upper 95% confidence limits for the corresponding population size estimate.

nhat.v.meth

Scalar indicating the type of variance estimate used. Values are: 4 = "(Model averaged Huggins variance)", 5 = "(Model averaged Huggins variance + higher terms)", or 6 = "(Model averaged McDonald and Amstrup)". See help for F.cjs.estim for more explanation.

Author(s)

Original routine by Eric Regehr, US Fish and Wildlife. Modified for MRA by Trent McDonald, WEST-INC, tmcdonald@west-inc.com

References

Burnham, K. and D. Anderson (2002) "Model Selection: A practical guide". Cambridge University Press.

See Also

F.cjs.estim, F.huggins.estim, F.fit.table, plot.cjs

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
## Fit several CJS model to dipper data. Model average survival

## Time varying survival and capture (true CJS model)
data(dipper.histories)
ct <- as.factor( paste("T",1:ncol(dipper.histories), sep=""))
attr(ct,"nan")<-nrow(dipper.histories)
dipper.01 <- F.cjs.estim( ~tvar(ct,drop=c(1,2)), ~tvar(ct,drop=c(1,6,7)), dipper.histories )

## Linear trend in survival
cT <- 1:ncol(dipper.histories)
dipper.02 <- F.cjs.estim( ~tvar(ct,drop=c(1,2)), ~tvar(cT, nan=nrow(dipper.histories)), 
  dipper.histories )

## No trend in survival
dipper.03 <- F.cjs.estim( ~tvar(ct,drop=c(1,2)), ~1, dipper.histories )

## Model average
mod.avg.surv <- F.cr.model.avg( ls(pat="^dipper.[0-9]"), what="s", fit.stat="aicc" )

mod.avg.n <- F.cr.model.avg( ls(pat="^dipper.[0-9]"), what="n", fit.stat="aicc" )

## Plot
plot(mod.avg.n)

mra documentation built on May 1, 2019, 6:50 p.m.