score.test error

questions concerning anlysis/theory using program DENSITY and R package secr. Focus on spatially-explicit analysis.

score.test error

Postby JohnNettles » Tue Dec 12, 2023 1:54 am

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!
JohnNettles
 
Posts: 8
Joined: Tue Dec 07, 2021 3:21 pm

Re: score.test error

Postby murray.efford » Tue Dec 12, 2023 5:29 am

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
murray.efford
 
Posts: 712
Joined: Mon Sep 29, 2008 7:11 pm
Location: Dunedin, New Zealand

Re: score.test error

Postby JohnNettles » Tue Dec 12, 2023 3:36 pm

Yep, looks like that fixed it. Thanks!
JohnNettles
 
Posts: 8
Joined: Tue Dec 07, 2021 3:21 pm


Return to analysis help

Who is online

Users browsing this forum: No registered users and 2 guests