3
$\begingroup$

I'm trying to fit GAM models to acoustic backscatter data (Sv_mean; measured in dB, log scale) which is proportional to the density of fish in the water column. I have four years of daily data. In the winter time there are a bunch of zeros (which in log scale are represented as -999dB). The zeroes are true zeroes. To go around having these -999, I replaced the zeroes with values 3 dB below the minimum backscatter value in the series (~ -134 dB that's roughly half the minimum fish density).

To account for autocorrelation in the data I'm including a correlation term in the gamm() function (my data is ordered and I don't have NAs). I'm also including a linear form of time (date_numeric) to account for interannual patterns and day of year (julian_day) using a cyclic cubic spline to look at seasonal patterns. I am planning to do model selection using different candidate models with a different set of environmental covariates.

I've fitted a couple of GAM models and it seems that no model is picking up the transformed zeroes. Because the zeroes have a seasonality, the normalized residuals keep having some autocorrelation.

What are possible solutions to this?

Here is the time series:

enter image description here

Here is how the distribution of the backscatter values (Sv_mean) look like:

enter image description here

Here is the example model I'm fitting:

gam_6 <- gamm(Sv_mean ~ s(bottom_temperature1, bs="cr") +  
    s(mw_salinity2, bs="cr") + s(sea_ice, bs="cr") + 
    s(nitrate_corrected, bs="cr") + s(julian_day, bs="cc", k=365)
    + s(mw_PAR2, bs="cr") + s(chla_insitu_corrected, bs="cr") + 
    s(date_numeric, bs="cr"), method="REML", data=data, 
    correlation = corAR1(form = ~ 1))

Here is the output from gam.check()

enter image description here

Here is the data and fitted model (you can see the transformed zeroes occurring during specific months each year):

enter image description here

And here are the normalized residuals with their ACF and PACF:

enter image description here

$\endgroup$
2
  • 1
    $\begingroup$ Zero probably means that there is no fish present. That is then a textbook case for zero-inflation and you should use a model that is designed for this (basically a logistic presence-absence model coupled with a magnitude model for the presence cases). You should probably not use the log-values as DV and certainly not replace zeros with something arbitrary. $\endgroup$
    – Roland
    Commented Oct 27, 2021 at 9:18
  • 3
    $\begingroup$ I would argue that while you might regard these as true zeroes, the data are really censored; your equipment almost surely cannot detect a zero value, i.e. a limit of detection. You could fit a censored gamma model or a hurdle gamma model in such cases; IIRC these end up giving the same result they just differ in terms of where they pile up information coming from the non-detects. You can't fit this model in {mgcv} but you could do it in {brms} using the same model definitions for the smooths as you used in {mgcv}. $\endgroup$ Commented Oct 29, 2021 at 9:17

1 Answer 1

1
$\begingroup$

You could try a zero adjusted gamma (ZAGA) distribution model in the gamlss package.

ZAGA(mu, sigma,nu) distribution takes value 0 with probability nu, and a gamma GA(mu, sigma) distribution with probability (1-nu).

All the ZAGA parameters, mu, sigma and nu, can be modelled using explanatory variables.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.