I’m writing a GAM using the mgcv package that predicts burrow abundance and distribution of two different species on an island using data obtained during a field trip and images taken from the Sentinel satellite. 101 plots were surveyed. 922 burrows belonging to species 1 were recorded in 66 plots and 29 burrows belonging to species 2 were recorded in 8 plots.
I used a negative binomial distribution for species 1 as using a Poisson distribution resulted in the model being over dispersed. The maximal model was:
gam(Species_1 ~ s(x, y, bs="ts") +
Sentinel2_band_1 + Sentinel2_band_2 + Sentinel2_band_3 + Sentinel2_band_4 + Sentinel2_band_5 +
Sentinel2_band_6 + Sentinel2_band_7 + Sentinel2_band_8 + Sentinel2_band_9 + Sentinel2_band_10 +
I(Sentinel2_band_1^2) + I(Sentinel2_band_2^2) + I(Sentinel2_band_3^2) + I(Sentinel2_band_4^2) + I(Sentinel2_band_5^2) +
I(Sentinel2_band_6^2) + I(Sentinel2_band_7^2) + I(Sentinel2_band_8^2) + I(Sentinel2_band_9^2) + I(Sentinel2_band_10^2) +
aspect + elevation + slope +
I(aspect^2) + I(elevation^2) + I(slope^2) +
aspect:elevation + aspect:slope + elevation:slope,
data = dat,
family = nb(1))
The model selection process has resulted in a model that gives acceptable results.
When I run the same model using species 2 as the response variable I get the following error message:
Warning message:
In newton(lsp = lsp, X = G$X, y = G$y, Eb = G$Eb, UrS = G$UrS, L = G$L, :
Fitting terminated with step failure - check results carefully
The diagnostic plots also look pretty dodgy:
My assumption the issue I’m encountering is due to the much smaller sample size for species 2.
Any ideas what I can do to resolve this problem?