rbchan / unmarked

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

Don't warn when predicting from model where a factor present in covariates is not in the model #172

Closed kenkellner closed 4 years ago

kenkellner commented 4 years ago

Fixes #168. Also consolidates some code for building model matrices. @aosmith16, look OK?

rbchan commented 4 years ago

This looks good to me. I'll merge it after you hear back from @aosmith16. BTW, we should add @aosmith16 to the list of authors or to the list of collaborators. I don't think we've made a distinction between authors and collaborators yet, but perhaps that's something we should think about.

kenkellner commented 4 years ago

Good idea, I opened #173 to collect thoughts on that.

aosmith16 commented 4 years ago

This looks good to me. I think this approach of having an overall function to do the heavy lifting is going to make things way easier to maintain in the long run. :+1: As you know, changing things in each function is quite time-consuming so the short term pain of converting to functions like you did here may well be worth it.

Good job catching that warning message on missing factors, as well and finding the fix. It's nice to get all these bugs out now, so users can ooh and aah over their predictions. :smile: