A tidy data frame of the observed and predicted survey and fishery indices
from a fitted model, with standard errors, confidence intervals, a log-scale
residual and the catchability blocks. Population-specific indices are included
when their Use*_pop flags hold any ones.
Arguments
- data
Input data used in the RTMB model, holding
ObsSrvIdx,ObsSrvIdx_SE,ObsFishIdx,ObsFishIdx_SE,Wt_SrvIdx,Wt_FishIdx,srv_q_blocks,fish_q_blocks,UseFishIdxandUseSrvIdx, plus the_popcounterparts for the population-specific indices.- rep
RTMB report holding
PredSrvIdxandPredFishIdx, both[n_pop × n_regions × n_years × n_seas × n_fleets]. The pooled indices are summed across populations; the population-specific ones read each slice directly.SrvIdx_SDandFishIdx_SD, with their_popcounterparts, give the total index standard deviation the intervals use.- year_labs
Year labels for the year dim of the index arrays.
Value
A data frame with Region, Year, Seas,
Fleet, Type ("Survey", "Fishery",
"Pop Survey" or "Pop Fishery"), the observed value obs
and predicted value, the weight-adjusted total standard deviation
se, the 95% lognormal interval lci and uci, the
q_block, the log-scale resid, and Category, which
combines the type, population, fleet, season and q block.
Details
The resid column is the plain log-scale residual
\(\log(\text{obs}) - \log(\text{predicted})\), not a one-step-ahead
residual. For decorrelated OSA index residuals, with the QQ plots and SDNR
from plot_resids, use get_osa with
index_source. The fit plot built from this output is
get_idx_fits_plot.
Examples
if (FALSE) { # \dontrun{
idx_fits <- get_idx_fits(
data = data,
rep = rep,
year_labs = seq(1960, 2024, 1)
)
} # }