do pcount models with random effects still require specifying engine = "TMB"?

48 views
Skip to first unread message

Brett Walker - DNR

unread,
Jul 9, 2025, 4:36:55 PMJul 9
to unmarked
I'm running hiearhical, repeated-counts, N-mixture models using the pcount function in package unmarked. All my models include a random effect of region in the detection model, but I did not specify which engine to use. I just noticed that in the documentation, it says the pcount function "requires" specifying the TMB engine to run random effects. To test that, I re-ran my best-supported model specifying engine="TMB", but there was no difference in the model results or parameter estimates. The documentation for the occu function states that "TMB is used automatically if the model formula contains random effects". Is that now also the case with the pcount function, or do I need to re-run all my  models and specify engine="TMB"? 

Ken Kellner

unread,
Jul 9, 2025, 5:54:02 PMJul 9
to unma...@googlegroups.com
If you specify a random effect, then TMB should automatically be used. You can check this by just looking at the model output - if you specified a random effect you should see the random effect estimates in the summary.

Ken

On Wed, Jul 09, 2025 at 01:36:55PM -0700, Brett Walker - DNR wrote:
> I'm running hiearhical, repeated-counts, N-mixture models using the *pcount*
> function in package unmarked. All my models include a random effect of
> region in the detection model, but I did not specify which engine to use. I
> just noticed that in the documentation, it says the *pcount* function
> "requires" specifying the TMB engine to run random effects. To test that, I
> re-ran my best-supported model specifying engine="TMB", but there was no
> difference in the model results or parameter estimates. The documentation
> for the *occu *function states that "TMB is used automatically if the model
> formula contains random effects". Is that now also the case with the
> *pcount* function, or do I need to re-run all my models and specify
> engine="TMB"?
>
> --
> *** 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 visit https://groups.google.com/d/msgid/unmarked/5cfec602-667f-48c7-baa5-0c64a12cf1e8n%40googlegroups.com.

Walker - DNR, Brett

unread,
Jul 10, 2025, 4:15:09 PMJul 10
to unma...@googlegroups.com
Thank you for confirming that (and for the continual improvements!).


Brett Walker

Wildlife Researcher


Colorado Parks and Wildlife Signature Logo

P 970.255.6125  |  C 970.787.0519

711 Independent Ave.

Grand Junction, CO 81505

brett....@state.co.us  |  cpw.state.co.us


Facebook icon Instagram icon YouTube icon





--
*** 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)
---
Reply all
Reply to author
Forward
0 new messages