##input model list
    Models<-params$Models;
    doc_type<-params$doc_type;
    plot1stObs<-params$ModelFitsACD$plot1stObs;
    numRecent<-params$ModelFitsACD$numRecent;

    ##set appendix letter
    app="A";
    ##set knitr options for subsequent chunks
    knitr::opts_chunk$set(echo=FALSE, error=FALSE, message=FALSE, warning=FALSE, concordance=TRUE, fig.width=6.5, fig.height=7.0, dpi=300)

    ##set caption numbering
    if (!exists("fig")){
      fig<-1;#figures
      tbl<-0;#tables
    }

    cases<-names(Models);
    nCases<-length(cases);

Model fits to aggregated catch data

Fits to the aggregated catch data available to the model(s) are presented in this section. Not all of the fits presented are necessarily included in the parameter optimization for each model; some fits to datasets for a particular model may be included for comparison purposes with other models which include those data in their optimization. The reader should consult the main assessment document to determine which fits are included in the optimization for any particular model.

\blandscape

Survey biomass

Fits

  plts<-rCompTCMs::compareFits.BiomassData(Models,
                                           fleet.type='survey',
                                           catch.type='index',
                                           plot1stObs=plot1stObs,
                                           verbose=params$ModelFitsACD$verbose,
                                           numRecent=numRecent);
    if (!is.null(plts)){
      captions<-wtsUtilities::getCaptionsFromGGPlotList(plts);
      for (plt in plts) {print(plt); cat("\n\n"); fig<-fig+1;}
      rm(plt,plts);
    } else {
        cat("\nNo fits to survey biomass data.\n\n")
    }

\FloatBarrier

\elandscape

Z-scores

  plts<-rCompTCMs::compareFits.ZScores.Biomass(Models,
                                               fleet.type='survey',
                                               catch.type='index',
                                               verbose=params$ModelFitsACD$verbose);
    if (!is.null(plts)){
      captions<-wtsUtilities::getCaptionsFromGGPlotList(plts);
      for (plt in plts) {print(plt); cat("\n\n"); fig<-fig+1;}
      rm(plt,plts);
    } else {
        cat("\nNo z-scores for fits to survey biomass data.\n\n")
    }

\FloatBarrier

\blandscape

Survey abundance

Fits

  plts<-rCompTCMs::compareFits.AbundanceData(Models,
                                             fleet.type='survey',
                                             catch.type='index',
                                             plot1stObs=plot1stObs,
                                             verbose=params$ModelFitsACD$verbose,
                                             numRecent=numRecent);
  if (!is.null(plts)){
      captions<-wtsUtilities::getCaptionsFromGGPlotList(plts);
      for (plt in plts) {print(plt); cat("\n\n"); fig<-fig+1;}
      rm(plt,plts);
  } else {
        cat("\nNo fits to survey abundance data.\n\n")
    }

\FloatBarrier

\elandscape

Z-scores

    plts<-rCompTCMs::compareFits.ZScores.Abundance(Models,
                                                   fleet.type='survey',
                                                   catch.type='index',
                                                   verbose=params$ModelFitsACD$verbose);
    if (!is.null(plts)){
        captions<-wtsUtilities::getCaptionsFromGGPlotList(plts);
        for (plt in plts) {print(plt); cat("\n\n"); fig<-fig+1;}
        rm(plt,plts);
    } else {
        cat("\nNo z-scores for fits to survey biomass data.\n\n")
    }

\FloatBarrier

\blandscape

Fishery retained catch biomass

Fits

    plts<-rCompTCMs::compareFits.BiomassData(Models,
                                             fleet.type='fishery',
                                             catch.type='retained',
                                             plot1stObs=plot1stObs,
                                             verbose=params$ModelFitsACD$verbose,
                                             numRecent=numRecent);
    if (!is.null(plts)){
        captions<-wtsUtilities::getCaptionsFromGGPlotList(plts);
        for (plt in plts) {print(plt); cat("\n\n"); fig<-fig+1;}
        rm(plt,plts);
    } else {
        cat("\nNo fits to fishery retained catch biomass data.\n\n")
    }

\FloatBarrier

\elandscape

Z-scores

    plts<-rCompTCMs::compareFits.ZScores.Biomass(Models,
                                                 fleet.type='fishery',
                                                 catch.type='retained',
                                                 verbose=params$ModelFitsACD$verbose);
    if (!is.null(plts)){
        captions<-wtsUtilities::getCaptionsFromGGPlotList(plts);
        for (plt in plts) {print(plt); cat("\n\n"); fig<-fig+1;}
        rm(plt,plts);
    } else {
        cat("\nNo z-scores for fits to fishery retained catch biomass data.\n\n")
    }

\FloatBarrier

\blandscape

Fishery retained catch abundance

Fits

    plts<-rCompTCMs::compareFits.AbundanceData(Models,
                                               fleet.type='fishery',
                                               catch.type='retained',
                                               plot1stObs=plot1stObs,
                                               verbose=params$ModelFitsACD$verbose,
                                               numRecent=numRecent);
    if (!is.null(plts)){
        captions<-wtsUtilities::getCaptionsFromGGPlotList(plts);
        for (plt in plts) {print(plt); cat("\n\n"); fig<-fig+1;}
        rm(plt,plts);
    } else {
        cat("\nNo fits to fishery retained catch abundance data.\n\n")
    }

\FloatBarrier

\elandscape

Z-scores

    plts<-rCompTCMs::compareFits.ZScores.Abundance(Models,
                                                   fleet.type='fishery',
                                                   catch.type='retained',
                                                   verbose=params$ModelFitsACD$verbose);
    if (!is.null(plts)){
        captions<-wtsUtilities::getCaptionsFromGGPlotList(plts);
        for (plt in plts) {print(plt); cat("\n\n"); fig<-fig+1;}
        rm(plt,plts);
    } else {
        cat("\nNo z-scores for fits to fishery retained catch abundance data.\n\n")
    }

\FloatBarrier

\blandscape

Fishery total catch biomass

Fits

    plts<-rCompTCMs::compareFits.BiomassData(Models,
                                             fleet.type='fishery',
                                             catch.type='total',
                                             plot1stObs=plot1stObs,
                                             verbose=params$ModelFitsACD$verbose,
                                             numRecent=numRecent);
    if (!is.null(plts)){
        captions<-wtsUtilities::getCaptionsFromGGPlotList(plts);
        for (plt in plts) {print(plt); cat("\n\n"); fig<-fig+1;}
        rm(plt,plts);
    } else {
        cat("\nNo fits to fishery total catch biomass data.\n\n")
    }

\FloatBarrier

\elandscape

Z-scores

    plts<-rCompTCMs::compareFits.ZScores.Biomass(Models,
                                                 fleet.type='fishery',
                                                 catch.type='total',
                                                 verbose=params$ModelFitsACD$verbose);
    if (!is.null(plts)){
        captions<-wtsUtilities::getCaptionsFromGGPlotList(plts);
        for (plt in plts) {print(plt); cat("\n\n"); fig<-fig+1;}
        rm(plt,plts);
    } else {
        cat("\nNo z-scores for fits to fishery total catch biomass data.\n\n")
    }

\FloatBarrier

\blandscape

Fishery total catch abundance

Fits

    plts<-rCompTCMs::compareFits.AbundanceData(Models,
                                               fleet.type='fishery',
                                               catch.type='total',
                                               plot1stObs=plot1stObs,
                                               verbose=params$ModelFitsACD$verbose,
                                               numRecent=numRecent);
    if (!is.null(plts)){
        captions<-wtsUtilities::getCaptionsFromGGPlotList(plts);
        for (plt in plts) {print(plt); cat("\n\n"); fig<-fig+1;}
        rm(plt,plts);
    } else {
        cat("\nNo z-scores for fits to fishery total catch abundance data.\n\n")
    }

\FloatBarrier

\elandscape

Z-scores

    plts<-rCompTCMs::compareFits.ZScores.Abundance(Models,
                                                   fleet.type='fishery',
                                                   catch.type='total',
                                                   verbose=params$ModelFitsACD$verbose);
    if (!is.null(plts)){
        captions<-wtsUtilities::getCaptionsFromGGPlotList(plts);
        for (plt in plts) {print(plt); cat("\n\n"); fig<-fig+1;}
        rm(plt,plts);
    } else {
        cat("\nNo z-scores for fits to fishery total catch abundance data.\n\n")
    }


wStockhausen/rCompTCMs documentation built on Sept. 12, 2023, 3:13 p.m.