Function extract.indices
extracts the parameter indices from the
parameter index matrices (PIMS) for a particular type of parameter
that match a set of group numbers and rows and columns that are defined in
the dataframe df
. It returns a vector of indices which can be used to
specify the set of real parameters to be extracted by
covariate.predictions
using the index column in data
or
the indices
argument. If df is NULL, it returns a dataframe with all of
the indices with model.index being the unique index across all parameters and the
par.index which is an index to the row in the design data. If parameter is NULL then
the the dataframe is given for all of the parameters.
Function nat.surv
produces estimates of natural survival (Sn) from
total survival (S) and recovery rate (r) from a joint live-dead model in
which all harvest recoveries are reported. In that case, Taylor et al 2005
suggest the following estimator of natural survival Sn=S + (1-S)*r. The
arguments for the function are a mark model
object and a dataframe
df
that defines the set of groups and times (row,col) for the natural
survival computations. It returns a list with elements: 1) Sn
- a
vector of estimates for natural survival; one for each entry in df
and 2) vcv
- a variance-covariance matrix for the estimates of
natural survival.
Function pop.est
produces estimates of abundance using a vector of
counts of animals captured (ns
) and estimates of capture
probabilities (ps
). The estimates can be aggregated or averaged
using the design
matrix argument. If individual estimates are
needed, use an nxn identity matrix for design where n is the length of
ns
. To get a total of all the estimates use a nx1 column matrix of
1s. Any other design
matrix can be specified to subset, aggregate
and/or average the estimates. The argument p.vcv
is needed to
compute the variance-covariance matrix for the abundance estimates using the
formula described in Taylor et al. (2002). The function returns a list with
elements: 1) Nhat
- a vector of abundance estimates and 2) vcv
- variance-covariance matrix for the abundance estimates.
Function Compute.Sn
creates list structure for natural survival using
nat.surv
to be used for model averaging natural survival estimates
(e.g., model.average(compute.Sn(x,df,criterion))
). It returns a list
with elements estimates, vcv, weight: 1) estimates - matrix of estimates of
natural survival, 2)vcv - list of var-cov matrix for the estimates, and 3)
weight - vector of model weights.
Function search.output.files
searches for occurrence of a specific
string in output files associated with models in a marklist x. It returns a
vector of model numbers in the marklist which have an output file containing
the string.