BiologicalRecordsCentre / sparta

Species Presence/Absence R Trends Analyses
http://biologicalrecordscentre.github.io/sparta/index.html
MIT License
21 stars 24 forks source link

Informative prior issue #39

Closed GPowney closed 3 years ago

GPowney commented 7 years ago

https://github.com/BiologicalRecordsCentre/sparta/blob/f7ea39de9dd55adbe26e80d832bd31fb9dda361b/R/occDetBUGScode.r#L2

Note: The current formulation of the priors on the state model are strongly informative (at 0 or 1) on the occupancy scale, this is not ideal, as it can cause issues when modelling species with sparse data. We are currently investigating solutions to this issue as part of overall development work on the occupancy model. A quick fix is to logit transform the prior for the year and site effects as shown on page 573 of Kery and Royle (2015) Applied hierarchical modelling in ecology.

AugustT commented 7 years ago

I have added a warning message when this model is used

https://github.com/BiologicalRecordsCentre/sparta/blob/b9b4a5073a87f6379e6bd5ac53bf46c3003a70d0/R/occDetFunc.r#L153

drnickisaac commented 6 years ago

We've made a lot of progress on this since August. @CharlieOuthwaite has lots about this in her manuscript, including new Appendix D I think we can change the warning - we should still highlight where there are years at the beginning and end with zero records.

AugustT commented 5 years ago

@drnickisaac What should we change the warning to?

drnickisaac commented 4 years ago

Just looking at the code now. I think the warning is triggered when the user selects classic sparta. if(identical(model.file, occDetBUGScode)){ In which case I suggest we change the warning to the following: "You have selected priors that are potentially informative and subject to boundary effects (See Outhwaite et al 2018 for details). This option is retained within sparta for backwards compatibility only: we strongly recommend that you do not use this option for inferring changes in species' distributions."

drnickisaac commented 3 years ago

Done.