This is my first post here, so please excuse any etiquette infringements.
I am trying to use the dsm<https://cran.r-project.org/web/packages/dsm/dsm.pdf> package in R to model a species response to environmental covariates while also accounting for imperfect detection by including a detection function created in the Distance<https://cran.r-project.org/web/packages/Distance/Distance.pdf> package.
The package (unfortunately) doesn’t allow for GLMM engines to be used, however I have a nested survey design where multiple observations were made in the same transects per season per year. In a GLMM sense I would opt for a negative binomal distribution and might model it something like
But in dsm (as far as I know) I need to choose between a GAM, GAMM and a GLM engine. Would anyone have any advice on the best of these three to model nested random variables? I have tried using the GAM model but am not confident in how such an equation should be structured (it calls gam() from the mgcv package I believe). So I suspect it should something like this