rbchan / unmarked

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

Improve handling of formulas in occuMulti predict #158

Closed kenkellner closed 4 years ago

kenkellner commented 4 years ago

Functions in formulas (scale, poly, etc.) should now work when predicting from an occuMulti fit. Unexpected factor levels in newdata for predictions should properly result in an error. Tests added for these situations.

kenkellner commented 4 years ago

I wish the exact way model.frame and model.matrix interact with each other was better documented. @aosmith16 I think I can extend my tests to the functions you fixed. Let me know if it looks like I missed anything. I will send another PR for occuMS.