sigmao: Access or assign the observation error

sigmaoR Documentation

Access or assign the observation error

Description

By default the bdm package assumes that the observation error variance is fixed on input and specified in the bdmData object class. This function can be used to access or assign the standard deviation σ_o within an bdmData object.

Usage

sigmao(object, ...)

## S4 method for signature 'bdmData'
sigmao(object)

sigmao(object) <- value

## S4 replacement method for signature 'bdmData,numeric'
sigmao(object) <- value

## S4 replacement method for signature 'bdmData,matrix'
sigmao(object) <- value

Arguments

object

an bdmData object

...

additional arguments to the generic function

value

a numeric vector or matrix for σ_o

Details

Observation error is used to refer to the deviation of the abundance observation from the deterministic expectation:

E[I_{t}] = qB_{t}

where B is the biomass, I is the abundance index and q is the catchability scalar, which is estimated analytically as a nuisance parameter. The observation error is time variant and assumed by default to follow a log-normal distribution:

I_{t} \sim LN(ln(E[I_{t}])-σ^2_{o,t}/2, σ^2_{o,t})

The distribution of I around the value predicted by the model can be due to a variety of difference uncertainties, not just observation, and is sometimes referred to as the total error. Realistic values for the observation error are typically informed by standardisation of the abundance index time series. The default value is σ_o = 0.2 for all time points.

Value

Accessor function returns a matrix of σ_o values. Assignment function populates the bdmData object.

Examples

# initialize bdmData object
dat <- bdmData(harvest = 20:30, index = cbind(runif(11), runif(11)))

# assign single value
sigmao(dat) <- 0.1
sigmao(dat)

# assign values specific
# to each index
sigmao(dat) <- c(0.05, 0.1)
sigmao(dat)

# assign values specific
# to each time
sigmao(dat) <- seq(0.05, 0.2, length = 11)
sigmao(dat)

# assign values specific
# to each time and index
sigmao(dat) <- matrix(runif(22), nrow = 11)
sigmao(dat)


cttedwards/bdm documentation built on Oct. 11, 2022, 7:52 p.m.