kaitlyngaynor / gorongosa-mesocarnivores

2 stars 0 forks source link

why is model running so quickly #62

Closed kaitlyngaynor closed 4 years ago

kaitlyngaynor commented 4 years ago

The code in the unmarked package takes seconds, whereas it takes hours to run the model in Stan. Why is this? Is the unmarked approach still a Bayesian approach, or is it instead a frequentist approach? If it is Bayesian, are there way fewer chains/iterations?

kaitlyngaynor commented 4 years ago

Yeah, seems like it's not actually Bayesian. This is fine! Just good to know.

source code

klg-2016 commented 4 years ago

I haven't dug into Bayesian stuff too much yet, so I don't actually understand the difference between the two but I will take your word. Are priors (with the starts argument we were talking about the other day) only with Bayesian stats?

kaitlyngaynor commented 4 years ago

Yeah, that's why I'm kind of still confused.

They are two fundamentally/philosophically different approaches to the field of statistics. Given that you are still wading into the world of stats, it's a lot to wrap one's head around! Bayesian stats actually represents the way that we (as humans) intuitively think about the world, and probability, given our knowledge/experiences... it's described in very plain terms in this helpful YouTube video - in the video, she talks about how you update an initial belief (ex. about civet occupancy) after gaining knowledge over repeated iterations - this is why Bayesian analysis takes so long and is so computationally-intensive

Here's another explanation on this blog in "simple english"

Of course, understanding the philosophy vs. understanding the mechanics of the models are different stories :)

klg-2016 commented 4 years ago

Before I post anything to the google group, I'm running through some of the old questions to look for anything about extracting data from the S4 object so I'll add any comments on the type of stats to keep an eye out for. Some of the people responding to questions and offering help are Royle and Kellner, so I think the people who actually wrote lots of the code (so potentially very helpful).

Thank you for the Bayesian sources!

klg-2016 commented 4 years ago

This response (https://groups.google.com/forum/#!searchin/unmarked/occumulti|sort:date/unmarked/cI85RTVNXuY/DkWvGQ19EAAJ) seems to be saying you can't look at the effect of one species' presence on another's occupancy with occuMulti, which I thought was a key feature of the Rota model? I also thought it was something we were already doing? This question and response is a year old, so that might be the source of the confusion, but this threw me.

So far nothing on extracting data or anything else with the Bayesian/frequentist question.

kaitlyngaynor commented 4 years ago

No, I think this comment is saying that you can't look at the effect of one species' DETECTION on another species' DETECTION (occupancy and detection are modeled as separate process)

klg-2016 commented 4 years ago

Thank you, that makes more sense!

klg-2016 commented 3 years ago

I asked in the group to see what their explanation was for this question: Rota's paper used Bayesian approach and MCMC with Stan to estimate parameters. Unmarked uses maximum likelihood, which is usually much, much faster. The Bayesian approach has other advantages, for example, you can add random effects or customize the model structure (not possible in unmarked).