Provides functions that carry out SNIFFER's implementation of the Environment Agency's Fisheries Classification Scheme 2 (FCS2). This package was developed for use in Scotland, Northern Ireland and the Republic of Ireland as part of SNIFFER project WFD68c: Science Work.
The main functions are fcs2FitModel
which fits the
FCS2 statistical model, fcs2JointEQR
which
calculates samples of the joint EQR and fcs2Classify
which uses these to produce probabilistic WFD classifications.
The FCS2 approach consists primarily of two main tasks:
Fit the statistical model for each species.
Produce EQRs and classifications.
This package provides functions for carrying out all stages of this analysis. Other packages may be of use, for example RODBC can be used to read data into from a database.
Fitting the model for a single species consists of the following steps:
Select covariate terms for prevalence and abundance
regressions.
For this, fcs2FitModel
can be used with
runBUGS = FALSE
to find approximate parameter estimates using
INLA with which to judge the significance of each suggested term.
Alternatively fcs2ModelSelection
can be used to automatically
select a set of significant regression terms.
Set prior
distributions.
Default priors are given but plot.fcs2Fit
and fcs2Priors
can be used to check the priors so that they
can be modified if necessary before fitting the full Bayesian model.
Fit the full model.
fcs2FitModel
used with runBUGS =
TRUE
will fit the model using MCMC via either WinBUGS or
OpenBUGS. This can take much time.
Check Monte Carlo samples.
The
convergence of the MCMC chains can be checked with
plotBUGSTrace
and the sample can be thinned if necessary with
thinBUGSSamples
.
After fitting the model for every species, the EQRs and classifications can be found by the following steps:
Select values for pressure variables at reference conditions.
Observed
values of pressure variables are replaced with reference values for the
model to make predictions of reference conditions.
Calculate
EQR samples.
fcs2SingleEQR
can calculate
EQRs for single species and surveys and fcs2JointEQR
calculates combined EQR values.
Select EQR class
boundaries.
These may be selected by comparing the mean EQR
values produced from surveys of each class.
Calculate probability of
each class.
This can be calculated using fcs2Classify
.
Alternatively, the function fcs2EQRSummaryMatrix
can be used
to provide a tabulated summary of joint and single EQRs as well as
probabilities of class.
David Wyncoll d.wyncoll@hrwallingford.co.uk of HR Wallingford http://www.hrwallingford.co.uk for SNIFFER http://www.sniffer.org.uk
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.