relationship_plot: Plot the Relationship of a Variable with Day of the Season

View source: R/plotting.R

relationship_plotR Documentation

Plot the Relationship of a Variable with Day of the Season

Description

Plot the Relationship of a Variable with Day of the Season

Usage

relationship_plot(
  response,
  settings = list(),
  dat = KuskoHarvPred:::fit_data,
  separate_day_types = TRUE,
  pred_day = NULL,
  pred_response = NULL,
  draw_mape_range = FALSE
)

Arguments

response

Character; one of "effort", "total_cpt", "chinook_comp", "chum_comp", or "sockeye_comp"

settings

list specifying which values of predictor variables to subset the predicted values for. Passed to subset_pred_data(), see the Details section of that help file for how to use this argument.

dat

data.frame; the input regression data set, defaults to KuskoHarvPred:::fit_data, which is equivalent to KuskoHarvData::prepare_regression_data() but takes no time to process.

separate_day_types

Logical; if the variable passed to response used the predictor variable fished_yesterday, should two relationships be drawn?

pred_day

Numeric; the day (1 = June 1; see KuskoHarvUtils::to_days_past_may31()) corresponding to a hypothetical prediction (pred_response). Defaults to NULL in which case this is not drawn.

pred_response

Numeric; the predicted response corresponding to pred_day. Defaults to NULL in which case this is not drawn.

draw_mape_range

Logical; should a shaded region around model prediction that shows +/- 1MAPE from LOO analyses be shown?


bstaton1/KuskoHarvPred documentation built on Aug. 15, 2024, 3:30 p.m.