Closed mackerman44 closed 2 years ago
Quick note, if calculating proportions: the denominator should be the number of wood pieces where the Yes/No value is NOT NA.
So if there were 100 pieces of wood, 70 of them are wetted, 25 are not, and 5 are NAs: The proportion wetted would be 70 / (70 + 25).
You could randomly assign a Yes/No value to the other 5 based on that proportion, but I think it probably makes more sense to leave them as NA.
Good point!
At this point, I'm kind of waiting to see what the final cu (channel unit) or hr (habitat reach) metrics are. Depending on whether those are counts, proportions, or (maybe more likely) densities, seems it will affect how best to deal with this issue.
Resolved for now.
We need to determine how to deal w/ NAs in the wet, channel_forming, and ballasted columns of the wood data. These are records where the field tech forgot or had an error when recording that information. We currently aren't using that information "downstream", but it could be useful at some point...
One idea is to calculate the proportion Yes/No for each column within a given channel unit OR survey (which is important), and then draw from those proportions to determine whether a given NA should be Yes/No (e.g., if 60% of all wood pieces in a survey are wet, draw from that to determine Yes/No with a 60% chance of being "Yes"). Stated that very inelegantly.