When the observation errors for aggregate catch and indices are bias corrected (which they are by default, bias_correct_oe = 1), the plotted residuals are not calculated using the bias correction. This makes most/all of the residuals negative, e.g:
Instead of calculating residuals as:
log_stdres = (log(catch)-log(pred_catch))/sigma,
we should change it to
log_stdres = (log(catch)-log(pred_catch)+0.5*sigma^2)/sigma
because the expectation of each catch obs is the pred catch - 0.5*sigma^2 (i.e. Eqn 8 in WHAM paper). Should also be adjusted by exp(log_catch_sig_scale) if that's used.
Going forward:
pred_catch remains the same, (the Baranov eq, C_hat in Eqns 7-8)
log_pred_catch removed
pred_log_catch = log(pred_catch) + 0.5*sigma^2, replaces pred_catch in residual calcs
log_catch_resid corrected
When the observation errors for aggregate catch and indices are bias corrected (which they are by default,
bias_correct_oe = 1
), the plotted residuals are not calculated using the bias correction. This makes most/all of the residuals negative, e.g:Instead of calculating residuals as:
log_stdres = (log(catch)-log(pred_catch))/sigma
, we should change it tolog_stdres = (log(catch)-log(pred_catch)+0.5*sigma^2)/sigma
because the expectation of each catch obs is the pred catch - 0.5*sigma^2 (i.e. Eqn 8 in WHAM paper). Should also be adjusted byexp(log_catch_sig_scale)
if that's used.Going forward:
pred_catch
remains the same, (the Baranov eq, C_hat in Eqns 7-8)log_pred_catch
removedpred_log_catch = log(pred_catch) + 0.5*sigma^2
, replacespred_catch
in residual calcslog_catch_resid
correctedSame for the indices.