ABeginnersGuide: A beginners introduction and guide to RMark
Description
The RMark package is a collection of R functions that can
be used as an interface to MARK for analysis of
capture-recapture data.Details
The library contains various functions that import/export
capture data, build capture-recapture models, run the
FORTRAN program MARK.EXE, and extract and display output.
Program MARK has its own user interface; however, model
development can be rather tedious and error-prone because
the parameter structure and design matrix are created by
hand. This interface in R was created to use the formula
and design matrix functions in R to ease model
development and reduce errors. This R interface has the
following advantages: 1) Uses model notation to create
design matrices rather than designing them by hand in
MARK or in EXCEL, which makes model development faster
and more reliable. All-different PIMS are automatically
created for each group (if any). 2) Allows models based
on group (factor variables) and individual covariates
with groups created on the fly. Age, cohort, group and
time variables are pre-defined for use in formulas. 3)
Both real and beta labels are automatically added for
easy output interpretation. 4) Input, output and
specific results (eg parameter estimates, AICc etc) are
stored in an R object where they can be manipulated as
deemed useful (eg plotting, further calculations,
simulation etc). 5) Parameter estimates can be displayed
in triangular PIM format (if appropriate) for ease of
interpretation. 6) Easy setup of batch jobs and the calls
to the R functions document the model specifications and
allow models to be easily reproduced or re-run if data
are changed. 7) Covariate-specific estimates of real
parameters can be computed within R without re-running
the analysis.
The following are the MARK capture-recapture models that
are currently supported: ll{ model Selection in MARK
CJS Recaptures only
Recovery Recoveries only
Burnham
Both(Burnham)
Barker Both(Barker)
Pradel Pradel recruitment only
Pradsen Pradel survival and seniority
Pradlambda Pradel survival and lambda
Pradrec Pradel survival and recruitment
LinkBarker Available only in change data type
as Link-Barker
Closed Closed - no
heterogeneity
HetClosed Closed with
heterogeneity
FullHet Closed with full
heterogeneity
Huggins Huggins with no
heterogeneity
HugHet Huggins with
heterogeneity
HugFullHet Huggins with full
heterogeneity
POPAN POPAN
Jolly
Burnham formulation for original Jolly-Seber
model
Known Known - known fate data (e.g,
radio-tracking)
Multistrata Multistrata -
CJS model with strata
Robust Robust design
with Closed models for secondary periods with no
heterogeneity
RDHet Robust design with
Closed models for secondary periods with heterogeneity
RDFHet Robust design with Closed models for
secondary periods with full heterogeneity
RDHuggins Robust design with Huggins models
for secondary periods with no heterogeneity
RDHHet Robust design with Huggins models for
secondary periods with heterogeneity
RDHFHet
Robust design with Huggins models for secondary
periods with full heterogeneity
Nest Nest
survival
Occupancy Site occupancy
modelling
OccupHet Site occupancy
modelling with mixture model for heterogeneity
RDOccupEG Robust design site occupancy
modelling; single Psi, espsilon, and gamma
RDOccupPE Robust design site occupancy
modelling; mutliple Psi and espsilon
RDOccupPG
Robust design site occupancy modelling; mutliple Psi
and gamma
RDOccupHetEG Robust design site
occupancy modelling with heterogeneity; single Psi,
espsilon, and gamma
RDOccupHetPE Robust
design site occupancy modelling with heterogeneity;
mutliple Psi and espsilon
RDOccupHetPG Robust design site occupancy modelling with
heterogeneity; mutliple Psi and gamma
OccupRNPoisson Royle-Nichols Poisson site
occupancy modelling
OccupRNNegBin Royle-Nichols Negative Binomial site occupancy
modelling
OccupRPoisson Royle count
Poisson site occupancy modelling
OccupRNegBin
Royle count Negative Binomial site occupancy
modelling
MSOccupancy Multi-state site
occupancy modelling
ORDMS Open robust
design multi-state
CRDMS Closed robust
design multi-state
}
There is one limitation of this interface beyond the
obvious that it does not currently handle all of the
models and capabilities in MARK. All models in this
interface are developed via a design matrix approach
rather than coding the model structure via parameter
index matrices (PIMS). In most cases, a logit or other
link is used by default which has implications for
ability of MARK to count the number of identifiable
parameters (see dipper for an example).
However, beginning with v1.7.6 the sin link is now
supported if the formula specifies an identity design
matrix for the parameter.
Before you begin, you must have installed MARK
(http://www.cnr.colostate.edu/~gwhite/mark/mark.htm)
on your computer or at least have a current copy of
MARK.EXE. As long as you selected the default location
for the MARK install (c:/Program Files/Mark), the
RMark library will be able to find it. If for
some reason, you chose to install it in a different
location, see the note section in mark for
instructions on setting the variable MarkPath to specify
the path. In addition to installing MARK, you must have
installed the RMark library into the R library
directory. Once done with those tasks, run R and enter
library(RMark) (or put it in your .First function) to
attach the library of functions.
The following is a categorical listing of the functions
in the library with a link to the help for each function.
To start, read the help for functions
import.chdata and mark to
learn how to import your data and fit a simple model.
The text files for the examples shown in
import.chdata are in the subdirectory data within
the R Library directory in RMark. Next look at the
example data sets and analyses dipper,
edwards.eberhardt, and
example.data. After you see the structure
of the examples and the use of functions to fit a series
of analyses, explore the remaining functions under Model
Fitting, Batch Analyses, Model Selection and Summary and
Display. If your data and models contain individual
covariates, read the section on Real Parameter
Computation to learn how to compute estimates of real
parameters at various covariate values.
Input/Output data & results
import.chdata,read.mark.binary,
extract.mark.output
Exporting Models to MARK interface
export.chdata, export.model
Model Fitting
mark, process.data,
make.design.data,
add.design.data,
make.mark.model,
run.mark.model
merge_design.covariates
Batch analyses with functions
run.models, collect.models,
create.model.list,
mark.wrapper
Summary and display
summary.mark, print.mark,
print.marklist, get.real,
compute.real,
print.summary.mark
Model Selection/Goodness of fit
adjust.chat,
adjust.parameter.count,
model.table , release.gof,
model.average
Real Parameter computation
find.covariates,
fill.covariates, compute.real
, covariate.predictions
Utility and internal functions
collect.model.names,
compute.design.data,
extract.mark.output,
inverse.link,
deriv.inverse.link,
setup.model,
setup.parameters,
valid.parameters, cleanup
For examples, see dipper for CJS and POPAN,
see example.data for CJS with multiple
grouping variables, see edwards.eberhardt
for various closed-capture models, see
mstrata for Multistrata, and see
Blackduck for known fate. The latter two
are examples of the use of mark.wrapper for
a shortcut approach to creating a series of models. Other
examples have been added for the various other models.References
MARK: Dr. Gary White, Department of Fishery and Wildlife
Biology, Colorado State University, Fort Collins,
Colorado, USA
http://www.cnr.colostate.edu/~gwhite/mark/mark.htm