Skip to contents

A lognormal deviation with variance \(v\) has \(E[\exp(x)] = \exp(\mu + v/2)\), so recruitment keeps its mean at \(R_0\) only if the cell's mean drops by \(v/2\). The \(v\) that does it is the cell's variance conditional on what the model already knows (the observed covariate values, and the years before a series starts), not the sd line's square: under a self path \(\rho\) a settled year has \(\sigma^2 / (1 - \rho^2)\), and every lagged path adds to it. For unknown cells \(U\) and known cells \(K\), \(\mathrm{Var}(x_U \mid x_K) = (Q_{UU})^{-1}\), the inverse of the unknown block of the precision, so each cell's variance is a diagonal entry of that inverse.

Usage

get_dsem_margvar(
  dsem_beta,
  ln_dsem_sd,
  x_grid,
  dsem_model,
  dsem_cells,
  known_cell
)

Arguments

dsem_beta, ln_dsem_sd, dsem_model

As in get_dsem_arrow_values.

x_grid

Matrix [year, series] of the grid, needed when an arrow is moderated.

dsem_cells

Output of get_dsem_cells.

known_cell

Logical over the n_grid_yrs * n_series cells (years within series), TRUE where the model already knows the value.

Value

Matrix [year, series] of variances, zero on the known cells.

Details

A solved series (an sd of zero) has no row of its own in the precision. Its cells move with whatever sets them, and get_dsem_Q_oo folds that into the rows that keep an innovation, so the correction and the density use the same precision.