Fixed bug in occu() when using the TMB engine

143 views
Skip to first unread message

Ken Kellner

unread,
Jan 5, 2024, 8:13:10 AM1/5/24
to unmarked
Hi all,

The occu() function in the released version of unmarked on CRAN can give incorrect answers under specific circumstances. If *all* of the following apply to your analysis:

1. Used occu()
2. Fit a random effect (or used engine = "TMB")
3. Had detection covariate(s)
4. Had a large number of missing values in the encounter history
5. The missing values were interspersed among non-missing observations (rather than just used to pad out the end of each encounter history to handle unbalanced designs)

then the resulting estimates of the slopes in the detection model may be incorrect. I've pushed a fix to the dev version which you can install with the following code:

remotes::install_github("rbchan/unmarked")

I'll submit a new version to CRAN on January 8 when they open back up after the holiday. Thanks to Marc Kery for identifying this problem, and sorry for any problems it has caused.

Ken

Marc Kery

unread,
Jan 5, 2024, 9:35:55 AM1/5/24
to unmarked
Yeah, and I had sent an email to Ken about 10 hours ago and in this time he did this:
  • read my email
  • checked my analysis
  • correctly identified the problem
  • first supplied me with a quick fix and
  • then created a new , corrected devel version on GitHub
  • and writes a clear warning email about the whole thing.

Thank you Ken, for all the great work !!!

Best regards  – Marc


From: unma...@googlegroups.com <unma...@googlegroups.com> on behalf of Ken Kellner <con...@kenkellner.com>
Sent: Friday, January 5, 2024 14:13
To: unmarked <unma...@googlegroups.com>
Subject: [unmarked] Fixed bug in occu() when using the TMB engine
 
--
*** Three hierarchical modeling email lists ***
(1) unmarked (this list): for questions specific to the R package unmarked
(2) SCR: for design and Bayesian or non-bayesian analysis of spatial capture-recapture
(3) HMecology: for everything else, especially material covered in the books by Royle & Dorazio (2008), Kéry & Schaub (2012), Kéry & Royle (2016, 2021) and Schaub & Kéry (2022)
---
You received this message because you are subscribed to the Google Groups "unmarked" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unmarked+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/unmarked/84586556-16f0-4831-8515-2d4cfdaf9179n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages