Page 1 of 1

score.test error

PostPosted: Tue Dec 12, 2023 1:54 am
by JohnNettles
Hello,

I'm trying to do some model fitting with a site-specific learned response using the score.test function but am running into the following error:

Error in if (detector(traps(capthist)) %in% .localstuff$simpledetectors) savedlogmultinomial <- logmultinom(capthist, :
the condition has length > 1


I fit a model with only the site-specific learned response (bk) and then am trying to test additional covariates, hoping this will be faster than fitting bk again each time. I'm using the HEX detection function.

Here's my very basic code.
Code: Select all
st1 <- score.test(model.detect1,sigma~Season,betaindex=c(1,2,4))


Any advice would be greatly appreciated. Thanks!

Re: score.test error

PostPosted: Tue Dec 12, 2023 5:29 am
by murray.efford
Ah, yes. There's a previously innocent bug that now throws an error and has gone undetected for many months. Seems not many people use score.test(), despite its appeal. I have fixed the GitHub source code packaged here secr_4.6.5.tar.gz and in this Windows binary secr_4.6.5.zip. I hope that takes care of it. A CRAN update may not appear until next month.
Murray

Re: score.test error

PostPosted: Tue Dec 12, 2023 3:36 pm
by JohnNettles
Yep, looks like that fixed it. Thanks!