Get Catch and Discard Fits Plot
get_catch_fits_plot.RdPlots observed catch and discard time series alongside model-predicted values for one or more SPoRC model runs, for both pooled (region-level) and population-specific data streams.
Arguments
- data
List of length
n_models, where each element is a SPoRC data list.ObsCatch[n_regions × n_yrs × n_seas × n_fish_fleets]provides pooled observed catch, andObsDiscardprovides pooled observed discards.Wt_CatchandWt_Discard, together withln_sigmaC, are used to reconstruct observation-error standard deviations for confidence interval construction.When
UseCatch_poporUseDiscard_popcontain active elements, population-level data (ObsCatch_pop,ObsDiscard_pop) and corresponding weights are also used.- rep
List of length
n_models, where each element is a SPoRC model report (output ofobj$report()after optimisation).PredCatchandPredDiscard[n_pop × n_regions × n_yrs × n_seas × n_fish_fleets]are summed across populations for pooled trajectories and used directly for population-specific trajectories.ln_sigmaCandln_sigmaC_popare used for confidence interval construction.- model_names
Character vector of length
n_modelsgiving display names for each model run. Used in the legend for predicted trajectories.
Value
A list of ggplot objects:
- [[1]] catch_fit_rg_plot
Pooled catch fits (region-level). Produced when
UseCatch == 1. Observations shown asgeom_pointrangewith 95% lognormal confidence intervals; predictions shown as lines colored by model. Faceted by (Season × Fleet) × Region with free y-scales.- [[2]] catch_fit_pop_plot
Population-specific catch fits. Produced when
UseCatch_pop == 1. Faceted by (Population × Season × Fleet) × Region. ReturnsNULLif not used.- [[3]] discard_fit_rg_plot
Pooled discard fits (region-level). Produced when
UseDiscard == 1. Same structure as catch plots.- [[4]] discard_fit_pop_plot
Population-specific discard fits. Produced when
UseDiscard_pop == 1. ReturnsNULLif not used.
Details
Pooled predictions are summed across populations before comparison with observed data. Years where observed values are zero are excluded from both observed and predicted layers to avoid issues in lognormal confidence interval construction.
This function produces diagnostic plots for both catch and discard data.
Observed and predicted time series are shown for each, with lognormal
confidence intervals derived from ln_sigmaC (or population-level
equivalents) and sampling weights.
Observations equal to zero are excluded prior to plotting to avoid issues in log-space confidence interval construction.
Predicted catch and discard are aggregated across populations for pooled diagnostics, while population-specific plots use unaggregated outputs.