rbchan / unmarked

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

Predict with `gdistsamp` output #186

Closed mikemeredith closed 4 years ago

mikemeredith commented 4 years ago

Just run into a problem with prediction from a gdistsamp object with R 4.0.2 and unmarked 1.0.0.9009 -- version 1.0.0 on CRAN works fine, so guess it was something unfixed in latest devel version.

It works with type = "lambda" and type = "det", but not with type = "phi". The error message is

Error in .local(obj, coefficients, ...) : 
  ncol(coefficients) == length(obj@estimates) is not TRUE

This came up with a routine check of code in Kéry & Royle AHM vol 1 section 9.5.3, and I can send you code if you wish.

Thanks, Mike

kenkellner commented 4 years ago

Should be fixed in version 1.0.0.9010 (7ea45985). I ran the 9.5.3 code successfully but if you could double check that would be great.

mikemeredith commented 4 years ago

Thanks very much Ken! Just reran the code for that section and it works fine. -- Mike