distance sampling random effects

79 views
Skip to first unread message

Thomas McLaren

unread,
Apr 18, 2025, 7:43:58 PM4/18/25
to unmarked
Hi all,
To start, thanks to all the folks who've developed and maintained unmarked.  The discussion in this group has been enormously helpful in  my own work/development.

I'm returning to a project that uses several of the distance sampling models.  Most of the work was done just prior to the TMB engine and random effects being implemented in the package.

I was wondering if there's a list anywhere of the model functions which allow for random effects?  I seem to remember reading something like this here at one point but I can't seem to find it, and it isn't clear to me from the documentation which models allow this at the moment.

Specifically, for this project I'm interested in whether gdistsamp() and distsampOpen() allow for random intercepts.

Thanks!
-Tom

Ken Kellner

unread,
Apr 18, 2025, 8:09:11 PM4/18/25
to 'Thomas McLaren' via unmarked
Hi Tom,

Unfortunately random effects in gdistsamp and distsampOpen are not currently supported. The current list is:

distsamp, gdistremoval, multinomPois, occu, and pcount

Ken
> --
> *** Three hierarchical modeling email lists ***
> (1) unmarked (this list): for questions specific to the R package unmarked
> (2) SCR: for design and Bayesian or non-bayesian analysis of spatial capture-recapture
> (3) HMecology: for everything else, especially material covered in the books by Royle & Dorazio (2008), Kéry & Schaub (2012), Kéry & Royle (2016, 2021) and Schaub & Kéry (2022)
> ---
> You received this message because you are subscribed to the Google Groups "unmarked" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to unmarked+u...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/unmarked/b31d85bd-1e7c-466e-be24-52302f350ec5n%40googlegroups.com.

Thomas McLaren

unread,
Apr 18, 2025, 9:09:48 PM4/18/25
to unma...@googlegroups.com
Hi Ken,
Thanks for the quick reply!
I'll have to think a bit more about the project and if there's a workaround I can use.

For a case where I have repeated visits to a site within a period of closure: is it possible to set up a data frame for distsampOpen() that captures this? 

For example, if I visit 10 sites three times each year for several years, could I use distsampOpen to estimate the annual trend while accounting for the secondary periods within year(the three surveys)?

I seem to remember trying to implement this a few years ago without any success, but that could have been used error!

Tom McLaren
(he/him)
Biologist
Point Count Program
PO Box 758
Ashland, Oregon, 97520

You received this message because you are subscribed to a topic in the Google Groups "unmarked" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/unmarked/TWKPD9tOmIg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to unmarked+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/unmarked/aALpoV6ZsNLt9k1Z%40BADGER.

Jeffrey Royle

unread,
Apr 18, 2025, 9:13:17 PM4/18/25
to unma...@googlegroups.com
hi Tom,
 I'm confused about the question --a work around to allow for random effects?   That data structure is handled by gdistsamp or gdistsampOpen but WITHOUT random effects.  If you want the random effects you need to go the Bayesian analysis route I think. It's possible someone on the list has implemented this in Stan or something too, but we have JAGS code in the AHM books.
regards
andy


Jeffrey Royle

unread,
Apr 18, 2025, 9:23:20 PM4/18/25
to unma...@googlegroups.com

Thomas McLaren

unread,
Apr 20, 2025, 5:31:38 PM4/20/25
to unma...@googlegroups.com
Hi Andy,
Thanks for the interest!
Workaround probably wasn't the best choice of words without more context. 

This project is a simulation study that we've run using the unmarked functions I mentioned.  I've been diving back into it because the research team has some interest in whether we could extend the simulations to include cases where a random site intercept might be preferable.  Since the model is part of a larger simulation routine I was wondering if we could continue using the same unmarked functions we've already written into the workflow to do this.
Like you said, it sounds like this is something we'd need to do with JAGS or Stan.  Grateful for all the work that's gone into making Unmarked so accessible though.

Tom McLaren
(he/him)
Biologist
Point Count Program
PO Box 758
Ashland, Oregon, 97520
Reply all
Reply to author
Forward
0 new messages