StoXProject / RstoxData

R library for reading various biotic and acoustic data formats
https://stoxproject.github.io/RstoxData/
GNU Lesser General Public License v3.0
0 stars 1 forks source link

Should FilterUpwards = TRUE result in a warning in FilterAcoustic() and FilterStoxAcoustic()? #336

Open arnejohannesholmin opened 1 year ago

arnejohannesholmin commented 1 year ago

Using FilterUpwards = TRUE for acoustic data is dangerous, as it removes zeros which result in over-estimation of means. For filtering biotic data FilterUpwards = TRUE makes sense when excluding experimental hauls etc, and for acoustic-trawl projects one needs to keep only hauls with the target species.

edvinf commented 1 year ago

The same applies in general to biotic data. The typically have the same registration convetion (absence of record of species indicate zero). If downstream analysis depends on missing values being interpreted as zeroes FilterUpwards can lead to errors in estimation. I do not think we need to treat FilterAcoustic differently from the other filters.

I am torn on whether it is good to burden correct usage with these warnings. I think it is sufficient to clearly describe the issue in the documentation.

An alternative can be to implement some data visualization. For instance a histogram of transect SAs.

edvinf commented 1 year ago

Possibly, data sets with no zeros at all are rather uncommon. In that case we could perhaps consider implement warnings in the function that calculates means. So that a warning is issued whenever it encounters an input with no zeroes at all.