This function prepares data for running P2S on a single stream and covariate. It is called in fit_passage_to_spawner_model().

prepare_P2S_inputs(stream, selected_covariate, truncate_dataset = FALSE)

Arguments

truncate_dataset

a TRUE/FALSE value. If TRUE, will truncate the dataset so that only years where all covariate values are present are used.

stream_name:

The name of the stream for which you would like to run the P2S model. Can be battle creek, clear creek, deer creek, mill creek, or (draft form) butte creek.

selected_covariate:

The environmental covariate you'd like to run the model for. Can be either wy_type (water year type), max_flow_std (maximum flow), gdd_std (growing degree days), or null_covar (no environmental covariate).

Value

a list containing data elements required to run the STAN passage to spawner model