prepare_predictor_vars: Prepare a data set containing predictor variables for...

View source: R/prepare-predictive-data.R

prepare_predictor_varsR Documentation

Prepare a data set containing predictor variables for regression modeling

Description

Quickly summarizes various date/time and Bethel Test Fishery summaries, intended for fitting in regression models.

Usage

prepare_predictor_vars(dates = NULL)

Arguments

dates

Object of class "POSIXct/POSIXt"; vector of historical fishing dates to include. If NULL (the default) all dates included in the meta data set (?KuskoHarvData::openers_all) will be included.

Value

Data frame with rows for individual dates and columns for:

  • date: the date of the opener

  • year: the year of the opener

  • day: days past May 31st in the year of the opener (see KuskoHarvUtils::to_days_past_may31())

  • hours_open: the number of hours fishing was allowed that day

  • fished_yesterday: TRUE if drift gillnet fishing occurred the previous day

  • weekend: TRUE if the fishing day occurred on Saturday or Sunday

  • p_before_noon: fraction of the open hours that occurred before noon that day

  • total_btf_cpue: daily catch-per-unit-effort from the Bethel Test Fishery, averaged over a three day period where date is the second day

  • chinook_btf_comp: daily proportional composition of Chinook salmon from the Bethel Test Fishery, averaged over a three day period where date is the second day

  • chum_btf_comp: daily proportional composition of chum salmon from the Bethel Test Fishery, averaged over a three day period where date is the second day

  • sockeye_btf_comp: daily proportional composition of sockeye salmon from the Bethel Test Fishery, averaged over a three day period where date is the second day

  • mean_temp: daily average air temperature, in degrees Fahrenheit

  • mean_relh: daily average percent relative humidity

  • precip: total daily precipitation, in inches

Note

All Bethel Test Fishery variables obtained using summarize_btf().


bstaton1/KuskoHarvData documentation built on Aug. 15, 2024, 3:29 p.m.