ebuhle / LCRchumIPM

This is the development site for an Integrated Population Model for chum salmon in the lower Columbia River.
MIT License
4 stars 1 forks source link

Duncan Channel 2020 spawner observation error estimates in updated raw data file #14

Closed ebuhle closed 2 years ago

ebuhle commented 2 years ago

Hi @kalebentley, I'm working on updating the IPM fits with your recently updated data files, but I ran into a problem that I ultimately traced back to how the spawner observation error estimates for Duncan Channel in 2020 are coded. These are the relevant rows of spawner_data, as constructed here:

 year strata         location    disposition method S_obs SD tau_S_obs
1 2020  Gorge     Duncan Creek Duncan Channel Census    78  0         0
2 2020  Gorge Hamilton Channel Duncan Channel Census     0 NA        NA
3 2020  Gorge        Horsetail Duncan Channel Census     7 NA        NA
4 2020  Gorge            I-205 Duncan Channel Census     0 NA        NA
5 2020  Gorge             Ives Duncan Channel Census    21 NA        NA
6 2020  Gorge        Multnomah Duncan Channel Census    17 NA        NA
7 2020  Gorge         St Cloud Duncan Channel Census     0 NA        NA

Because the obs error SD for fish from location == "Duncan Creek" is coded as 0 while all others (and indeed all other cases with disposition == "Duncan Channel" across all years) are coded as NA, we wind up with two rows for 2020 when we aggregate spawner_data by taking the unique values of tau_S_obs (which should be a singular unique value).

I'm guessing that 0 should be an NA, but wanted to double-check before I edit the raw data.

kalebentley commented 2 years ago

@ebuhle, Indeed - the zero should be an NA to match the formatting from all other years.

ebuhle commented 2 years ago

Great, thanks. Do you want to make the change on your end since you have the master file?

kalebentley commented 2 years ago

The dataset has been updated