K value for pcountopen()

60 views
Skip to first unread message

Ashley S

unread,
May 21, 2025, 2:34:42 PMMay 21
to unmarked
Hi all,

I have run into a problem. My K value has been set to 41 while I have been fitting slow models, but my max count is actually 15, which I had thought was 21. And the rule I have been using was to add 20 to the max count (is that even correct?). Do I need to re run all my models with a K of 30? I was planning on running my final model (which I think I have) on a K=100 to test if the estimates stay the same. 


Thank you!

Ashley 

Ken Kellner

unread,
May 21, 2025, 3:31:39 PMMay 21
to unma...@googlegroups.com
You want to set K to be larger than the largest possible value of abundance at any site. There should be no cost to increasing K beyond that, except that it will take the model longer to run. So you're actually safer with K=41 than K=35. It never hurts to try a few K larger values to make sure the parameter estimates don't change, though.

Ken
> --
> *** 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/7ae807c5-ad05-4761-ace9-fa035f4f3581n%40googlegroups.com.

Ashley S

unread,
May 21, 2025, 3:43:44 PMMay 21
to unmarked
Thank you so much, Ken. That helps a lot. I will increase my K=60 and K=80 on my final model and hope that none of the parameter estimates change. Does that seem like a good strategy? 

Thank you!

Ashley 

Ken Kellner

unread,
May 21, 2025, 4:41:13 PMMay 21
to unma...@googlegroups.com
Yes, I think K=60-80 seems fine for a max count of 15.
> To view this discussion visit https://groups.google.com/d/msgid/unmarked/1236fd22-9351-4959-921b-cfd06dcf0514n%40googlegroups.com.

Ashley Sacco

unread,
May 21, 2025, 4:42:08 PMMay 21
to unma...@googlegroups.com
Wonderful. Thank you! 

Ashley S

unread,
May 25, 2025, 2:04:13 PMMay 25
to unmarked
The parameter estimates and the significance of those estimates changed with a K of 80, the AIC went down as well.  Do I use K=80 to for a final model? Or should I be concerned that they changed and go back to model fitting? How much should I rely on my residuals for a fitted model over a goodness of fit test?

Thank you,

Ashley

Marc Kery

unread,
May 26, 2025, 4:44:27 AMMay 26
to unmarked
Dear Ashley,

you should increase K even more and see whether you can find a value at which results (i.e., AIC or estimates of parameters) stabilize. If there is no such value, then it is likely that the MLEs for abundance will be infinity and for detection zero. Thus, in a sense the model is then not identified.

For more context, you can see these papers:


What should one do then ?
  • You could throw away your analysis/project and start another one.
  • Or, if you want to push it through, perhaps you could say that some value, say, 100, is a reasonable upper possible bound for abundance, and that therefore, use of that value for K would provide you with adequate point estimates. But that would mean being a Bayesian without using Bayesian methods. So, it might then be better to use JAGS/NIMBLE/STAN (or ubms) and fit the model there, using some non-vague prior that is sufficiently informative to overcome the problem that one has with maximum likelihood.

Best regards  --- Marc



From: unma...@googlegroups.com <unma...@googlegroups.com> on behalf of Ashley S <sacco....@gmail.com>
Sent: Sunday, May 25, 2025 20:04
To: unmarked <unma...@googlegroups.com>
Subject: Re: [unmarked] K value for pcountopen()
 

Ashley S

unread,
May 26, 2025, 9:29:05 PMMay 26
to unmarked
Marc,

Thank you for your feedback. I have been using NB mixture models because the AIC criterion fits my models best, but I do have a small sample size (29 sites, 102 days, max count of 15, and I am trying to use covariates). Will this lead me to a model with identifiability problems regardless of distributions? I will increase K for my final model and hopefully that stabilizes things. I will look into JAGS/NIMBLE/STAN but am unfamiliar with them and I don't have much time before I defend my thesis in June (hopefully).  

I have been running into an issue where one of my sites with 19 days of detection data is giving very high ~ -7,000 residuals and my other residuals are <10. This is concerning because it will bias my model, but I have sites that have similar amounts of data that are not giving those residuals. 

If all else fails, I will have to resort back to a GLMM. 

Thank you!!

Ashley 

Reply all
Reply to author
Forward
0 new messages