rbchan / unmarked

R package for hierarchical models in ecological research
https://rbchan.github.io/unmarked/
37 stars 25 forks source link

Add support for random effects to occu and pcount #200

Closed kenkellner closed 3 years ago

kenkellner commented 3 years ago

Fully supporting all unmarked fitting functions is a pretty long term goal, so I think it's better to release support incrementally. I think it would be nice to get support for these two into the next release so users can try them and provide feedback.

One thing I did not do is incorporate the randomTerms function (which provides estimates of random intercepts and/or slopes) into the existing ranef function. I think it might be a bit too much for one function and make the documentation really confusing. I'm open to changing this in the future though, and doing so shouldn't cause any backwards compatibility type issues.

kenkellner commented 3 years ago

Forgot to mention this PR also adds an error for all other fitting functions if you try to include a random effect in a formula.

rbchan commented 3 years ago

Great work, thanks!