kaitlyngaynor / gorongosa-mesocarnivores

2 stars 0 forks source link

starts argument #37

Closed klg-2016 closed 3 years ago

klg-2016 commented 4 years ago

https://github.com/kaitlyngaynor/gorongosa-mesocarnivores/blob/28a7b75eb812316a9f1ee257d8b9b5b44d913be2/scripts/Rota_fit_R.Rmd#L46

not sure what the starts argument represents

kaitlyngaynor commented 4 years ago

My guess is that these are the Bayesian priors.

From Wikipedia: In Bayesian statistical inference, a prior probability distribution, often simply called the prior, of an uncertain quantity is the probability distribution that would express one's beliefs about this quantity before some evidence is taken into account. For example, the prior could be the probability distribution representing the relative proportions of voters who will vote for a particular politician in a future election. The unknown quantity may be a parameter of the model or a latent variable rather than an observable variable.

As you mention in the other issue (which I've closed, just to keep this all in one place), the starts argument is not specified. I don't see the default values specified in the function, though, so am not sure how it deals with priors.

FYI this is the part of the Rota code that specifies the priors (from a normal distribution):

https://github.com/kaitlyngaynor/gorongosa-mesocarnivores/blob/c365ce634a0714229d824adc67baff5242192b4b/Rota%20Data/Formatting%20Data%20annotated.Rmd#L263-L274

klg-2016 commented 4 years ago

Ohhh! I have no background/experience with Bayesian stats, but that Wikipedia definition makes some sense. I'll do some googling and see if I can find anything on what the default values are. Rota used rnorm to "generate multivariate normal random variates in the space X" -- would we want to do something similar if we decide to set them intentionally?

kaitlyngaynor commented 4 years ago

I would recommend searching YouTube for videos with simple explanations of Bayesian statistics, or Bayes theorem/rule. Some of them are fairly accessible and I often find it easier to learn that way.

Basically, you want to tell the model what its default assumptions should be, in terms of the covariate values. I've always just done whatever is default/standard without questioning it too much... I won't pretend to be an expert in Bayesian stats!

klg-2016 commented 4 years ago

okay--I'll see what I can figure out!

klg-2016 commented 4 years ago

According to Ken Kellner (author of the occuMulti function), there's no reason to set your own starts values unless the model won't run for you:

Hi Gabby,

Providing your own custom starting values is optional. Typically you you would only provide them if you are having trouble getting the model to run successfully. Is that the situation you are in?

If you do need to set them, starts should be set equal to a numeric vector with one entry per parameter. In your case with 2 species and no covariates the vector would be length 5, with the following order: f1 intercept, f2 intercept, f12 intercept, species 1 detection intercept, species 2 detection intercept.

If you fit single-species occupancy models I suppose you could try to use the detection intercepts from those as starting values for the detection intercepts in occuMulti, but the occupancy intercepts are not equivalent.

Again, though, unless you are running into issues getting the model to run and you've ruled out all other issues, I don't think it's going to be very helpful to change the default starting values.

Ken

kaitlyngaynor commented 3 years ago

Very helpful!! closing this issue now