Hello, there.
In an experimental design comparing avian abundance in tapped and control pines, I am trying to fit a detection probability model to each one of my points, followd by a GLMM analyse of the number of birds detected, using the probability of detection as an offset (following suggestions by Steve Buckland in
https://groups.google.com/g/distance-sampling/c/ZW4RRBC_65o/m/8nHlM7JgBQAJ).
Each point was sampled 16 times, in different months in two years. So, I am trying to fit this model:
ds(data, truncation = 80, transect = "point", dht_group=TRUE, formula = ~ as.factor(Year) +Month, key = "hr", adjustment = NULL, convert_units=0.01)
For some of the points it works like a charm, but for others I am getting the following error:
Error in solve.default(m) :
Lapack routine dgesv: system is exactly singular: U[3,3] = 0
The error appears after printing the estimated AIC, in case it helps.
I've doing some trials and now I know the error is produced by the covariate Month. I initially thought it might be created by a lack of sample within years and months, but checking the number of birds in one of my problematic samples gives the following table:
Year Month n_ind
2023 7 195
2023 8 327
2023 9 404
2023 10 100
2023 11 40
2024 3 163
2024 4 75
2024 5 172
2024 6 40
2024 7 110
2024 8 100
2024 9 165
2024 10 115
2024 11 77
The number and distribution of birds in this particular point is even better that for some of the points where I got good fits.
I've been searching for this Lapack error and did not find anything usefull, could someone give some hint on this issue?
Thanks you in advance.
Asier