A question regarding predict function

42 views
Skip to first unread message

xinzhu zhang

unread,
Sep 25, 2024, 3:32:00 PMSep 25
to unmarked
Hi everyone
I'm trying to generate graphs for my occupancy models using "predict" function. At first, the function generated predicted value of detection/occupancy/colonization/extinction, with SE and lower and upper ends of CI from a set of value of the covariate I'm interested in. However, it seems that the lower and upper value does not equal to the predicted probability value +/- 1.96 or 1.44 * SE. Does anyone know the reason behind? Also, when I'm graph the CI on the predict plot, should I use "upper" and "lower" value from the output straight or should I calculate the CI using predicted probability +/- 1.96 or 1.44 SE?

Ken Kellner

unread,
Sep 25, 2024, 3:56:03 PMSep 25
to unma...@googlegroups.com
It's a bit confusing, but the lower and upper bounds are not calculated using the SE value predict() reports. The lower and upper bounds are calculated first on the transformed (log/logit) scale, and then back-transformed to the probability or abundance scale. Meanwhile, the SE is calculated using the delta method.

In general I would not use the SE estimate predict reports for anything. If you use this SE to calculate a CI with +/- 1.96*SE it is possible to get nonsensical answers like occupancy greater than 1 or less than 0.

If you want a different confidence interval than 95% you can set it with the 'level' argument.

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 on the web visit https://groups.google.com/d/msgid/unmarked/bfb2b0a5-f7bd-439d-83c4-f7ef9832d21dn%40googlegroups.com.

xinzhu zhang

unread,
Oct 2, 2024, 9:58:08 AMOct 2
to unmarked
Hi Ken
Thanks for your respond. Are you recommending using lower and upper value directly from predict function when generating the predicting plot for occupancy? Please see attached for an example. 
Predict CI.png
And here's an example of the graph I'm talking about
Predict plot.png

Marc Kery

unread,
Oct 2, 2024, 10:02:17 AMOct 2
to unmarked

Dear Xinzhu

 

Yes, that’s right.

 

Best regards  -- Marc

 

Von: unma...@googlegroups.com <unma...@googlegroups.com> Im Auftrag von xinzhu zhang
Gesendet: Mittwoch, 2. Oktober 2024 15:58
An: unmarked <unma...@googlegroups.com>
Betreff: Re: [unmarked] A question regarding predict function

 

Hi Ken

Thanks for your respond. Are you recommending using lower and upper value directly from predict function when generating the predicting plot for occupancy? Please see attached for an example. 

And here's an example of the graph I'm talking about

Reply all
Reply to author
Forward
0 new messages