scape (version 2.3-2)

estSigmaI: Estimate Abundance Index Sigma

Description

Estimate the effective sigma (magnitude of observation noise) for a survey or commercial abundance index, based on the empirical standard deviation.

Usage

estSigmaI(model, what="s", series=NULL, init=NULL, FUN=mean, p=1,
          digits=2)

Arguments

model

fitted scape model containing element CPUE and/or Survey.

what

which effective sigma to estimate: "c"[ommercial] or "s"[urvey] abundance index.

series

vector of strings indicating which gears or surveys to analyze (all by default).

init

initial sigma, determining the relative pattern of the effective sigmas between years.

FUN

function to use when scaling a vector of sigmas.

p

effective number of parameters estimated in the model.

digits

number of decimal places to use when rounding, or NULL to suppress rounding.

Value

Numeric vector of effective sigmas (one value if init=1), or a list of such vectors when analyzing multiple series.

Details

The init sigmas set a fixed pattern for the relative sigmas between years. For example, if there are two years of abundance index data and the initial sigmas are 0.1 in year 1 and 0.2 in year 2, the effective sigma will be two times greater in year 2 than in year 1, although both will be scaled up or down depending on how closely the model fits the abundance index. The value of init can be one of the following:

NULL

means read the initial sigmas from the existing CV column (default).

model

means read the initial sigmas from the CV column in that model (object of class scape).

numeric vector

means those are the initial sigmas (same length as the number of years).

FALSE or 1

means use one effective sigma (\(\hat sigma\)) across all years.

The idea behind FUN=mean is to guarantee that regardless of the value of init, the mean effective sigma will always be the same. Other functions can be used to a similar effect, such as FUN=median.

See Also

getN, getSigmaI, getSigmaR, estN, estSigmaI, and estSigmaR extract and estimate sample sizes and sigmas.

iterate combines all the get* and est* functions in one call.

plotIndex shows what is behind the sigma estimation.

scape-package gives an overview of the package.

Examples

Run this code
# NOT RUN {
## Exploring candidate sigmas:

getSigmaI(x.cod)       # sigma used in assessment 0.20
estSigmaI(x.cod)       # model fit implies 0.17
plotIndex(x.cod)       # model fit
estSigmaI(x.cod, p=8)  # eight estimated parameters implies 0.22

getSigmaI(x.sbw)          # sigma used in assessment
estSigmaI(x.sbw)          # model fit implies smaller sigma
estSigmaI(x.sbw, init=1)  # could use 0.17 in all years

## Same mean, regardless of init:

mean(estSigmaI(x.sbw, digits=NULL))
mean(estSigmaI(x.sbw, digits=NULL, init=1))

## Same median, regardless of init:

median(estSigmaI(x.sbw, FUN=median, digits=NULL))
median(estSigmaI(x.sbw, FUN=median, digits=NULL, init=1))

## Multiple series:

getSigmaI(x.oreo, "c")                 # sigma used in assessment
getSigmaI(x.oreo, "c", digits=2)       # rounded
estSigmaI(x.oreo, "c")                 # model fit implies smaller sigma
estSigmaI(x.oreo, "c", init=1)         # could use 0.19 in all years
estSigmaI(x.oreo, "c", init=1, digits=3)  # series 2 slightly worse fit
# estSigmaI(x.oreo, "c", init=1, p=11) # more parameters than datapoints

getSigmaI(x.oreo, "c", series="Series 2-1")  # get one series
estSigmaI(x.oreo, "c", series="Series 2-1")  # estimate one series
# }

Run the code above in your browser using DataLab