Distance sampling and habitat suitability

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Distance sampling and habitat suitability

Nicholas James
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

glmer.nb(count~ vegetation.cover+temperature+(1|SURVEYGR/YEAR/PlotID)
    , na.action = "na.fail"
    , data = dd, verbose=T)

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


gam(count ~ s(vegetation.cover) + s(temperature) + s(SURV.GR,YEAR,PlotID, bs="re")

           , family = nb()

           , data=dd, method="REML")

Note: this is a rephrased question from something I also posted on cross validation<https://stats.stackexchange.com/questions/431692/how-does-random-variable-nesting-in-gams-work-mgcv>
Thanks for your time!



        [[alternative HTML version deleted]]

_______________________________________________
R-sig-ecology mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology