-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New models in flocker #105
Comments
@mhollanders I too am very interested in models like you describe. Giant +1! |
Let's try to do this, though I cannot make any promises about timescales for getting things done from my end. If somebody is willing to do a big chunk of the lifting, I can comment to doing any necessary reviews and polishing in a timely manner. To get started, check out the instructions here https://github.com/jsocolar/flocker/blob/main/inst/rmd/adding_a_family.Rmd The main thing is to get a sketch of what the likelihood should look like, and then a sketch of what the |
Hi @jsocolar, sounds good. For the single season model, the key data structures are (1) the number of detections per site, primary occasion, and secondary occasion and (2) the waiting times between detections. For the multi-season version, there's an additional index of season. For the single season model, the idea is that there is an "overall occupancy" of each site (analogous to the single season occupancy probability) but that occupancy state is allowed to change within a deployment period. So essentially, this is just a zero-inflated (with the extra occupancy probability) dynamic occupancy probability where the observed data are waiting times. I should probably take a look at the current data format looks like for dynamic occupancy, as it should be analogous. For the multiseason version, I doubt that there is already a data type that has all the indices. |
Could you write out the likelihood in math notation? |
Yes. The idea is that there's an overall occupancy state of site where where again, Conditional on Where the last waiting time (which is the total occasion length if no detections were made) is modeled with a complement of the CDF of the exponential distribution. The call rate So basically, instead of assuming the site is occupied throughout the deployment period, the occupancy process is modeled more flexily and all of the detection data is used in the observation process. |
I've had a substantial think about this, and I think I have a plan of attack that is relevant to the There are two changes we need to make.
It turns out that (1) is going to be relatively easy (but not trivial) to implement. Because there are lots of use-cases, it's a good place to start because the effort won't be wasted even if later steps get bogged down. And happily, most of the machinery already exists for this in the data-augmented multi-species model framework, where collections of units (units = species-sites) are wrapped inside groupings (species) that have a collective binary occupancy state at the group level. I think the data-augmented custom family is already essentially the same thing as this, and all that needs to change is:
My preliminary thought about (2), i.e. passing waiting times as data, is that I don't want to implement it for this complicated multi-level occupancy model without first getting it implemented for a garden-variety single-season model. I think I can readily help with getting the data structure right, and it sounds like the likelihood piece will be pretty simple too. If you're still gung-ho to take this on, my suggestion to you is that you start with change number 1. Below, I'm going to provide a pretty detailed, sort of micro-managing guide to how to do that. Once you implement 1, I think you'll have a strong feel for how everything works, and probably can tackle 2 pretty readily, which will be slightly less trivial because it cannot lean quite so heavily on existing machinery that can be coopted for the same task. With both 1 & 2 under your belt, you'll be able to combine them effectively, I think. And then we can relax the assumption that Ok, so here we go, with a detailed plan for step 1:
|
Hi Jacob, I'm having a crack at steps 1--3 as outlined above. Pardon me that I'm a bit slow to understand all of this, as I've never worked on an R package before. I have a few questions.
Sorry about this, I'm a bit out of my depth. Matt |
No worries! Thanks for taking a look. An initial word of opportunity and caution: I'm really happy to walk you through the development of these functions (like honestly it would be wonderful!), but this is probably only a good idea if you are substantially interested in learning about writing the software. If your main interest is just in being able to fit the model, then I suspect that this could turn into a painful slog that might peter out rather than end with a usable deliverable. With that said:
|
Hi there,
I'm currently working on occupancy models specifically geared towards passive acoustic monitoring, where sites are allowed to chance occupancy state throughout the acoustic deployment period and the observation process deals with the waiting times. I'm currently working on the manuscript and it would be great if these models were available in existing R packages, for which I think flocker would make the most sense. Are you open to something like this?
Cheers,
Matt
The text was updated successfully, but these errors were encountered: