Description Usage Arguments Details Value Author(s) References See Also Examples
Computes model averaged estimates of survival, capture probability, or population size estimates from a set of previously fitted MRA objects.
1 | F.cr.model.avg( fits=ls(pattern="^fit"), what="survival", fit.stat="qaicc" )
|
fits |
A character vector of MRA fitted object names. Each will be retrieved from the global environment
(i.e., .GlobalEnv) using |
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". |
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.
If what
= "survival" or "capture", the return is a list object containing the following components:
fit.table |
A data frame, sorted by |
|
A matrix of size |
|
A matrix of size |
|
A matrix of size |
mod.selection.proportion |
A matrix of size |
If what
= "n.hat", the return is a list of class "n.hat" containing the following components:
fit.table |
A data frame, sorted by |
n.hat |
A vector of length |
se.n.hat |
A vector of length |
se.n.hat.conditional |
A vector of length |
mod.selection.proportion |
A vector of length |
n.hat.lower |
A vector of length |
n.hat.upper |
A vector of length |
nhat.v.meth |
Scalar indicating the type of variance estimate used. Values are: |
Original routine by Eric Regehr, US Fish and Wildlife. Modified for MRA by Trent McDonald, WEST-INC, tmcdonald@west-inc.com
Burnham, K. and D. Anderson (2002) "Model Selection: A practical guide". Cambridge University Press.
F.cjs.estim
, F.huggins.estim
, F.fit.table
,
plot.cjs
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.