NaNs produced from Occu() function

392 views
Skip to first unread message

Markus Fjellstad Israelsen

unread,
May 8, 2018, 6:51:27 AM5/8/18
to unmarked
Hi!
I am trying to analyse detection/nondetection data using a single-season site occupancy model but NaNs are produced and I don't know what to do. 

I have 238 sites, with 20 observations each year, something like this: 

 Site                                                                                                Hab:
   1     0  0  0  0  NA  NA  0  0  0  NA  0  0  0  0  0  0  1  0  0  0             Forest
   2     0  0  0  0  0  0  0  0  0  0  0  0  0  0  0  1  0  0  0  0  0  0             Mountain
   3    0  0  NA  0  0  1  0  0  0  0  0  0  0  0  0  0  0  NA  0  1  0             Marsh
  ...

The habitat variable has a total of five different levels.

Summary of the model:
Call:
occu(formula = ~obs.habitat.2011 ~ 1, data = umf, knownOcc = row2011)

NaNs producedOccupancy (logit-scale):
 Estimate  SE   z P(>|z|)
     26.3 NaN NaN     NaN

Does anybody know the cause of why NaNs are produced, both in general and in my case?
Can it be that I do not have enough data in my study to be able to extract the influence of habitat on detection probability?


Any help would be much appreciated

Markus

Geraldine Klarenberg

unread,
May 23, 2018, 12:42:41 PM5/23/18
to unmarked
I have the same problem: I have gathered that is because the occupancy is essentially 1. 
plogis(26.3) = 1

And then logit(1) = Inf
Which makes it impossible to calculate the standard error.

I have no suggestions on how to fix it though, or what to do!

Geraldine

Kery Marc

unread,
May 23, 2018, 1:17:13 PM5/23/18
to unma...@googlegroups.com
Hi,

there isn't much that can be done with this easily. If ALL of your sites in your sample have at least one detection, then the occupancy estimate is bound to be 1 and then with the usual methods one cannot obtain an SE.

There is another method to get a SE called profiling (yielding a profile interval), but I don't know how you could do this with R. Yet another solution would be to go Bayesian, where you always get a SE.

Best regards  --- Marc




From: unma...@googlegroups.com [unma...@googlegroups.com] on behalf of Geraldine Klarenberg [gklar...@gmail.com]
Sent: 23 May 2018 18:42
To: unmarked
Subject: [unmarked] Re: NaNs produced from Occu() function

--
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.
For more options, visit https://groups.google.com/d/optout.

Chris Sutherland

unread,
May 23, 2018, 2:13:11 PM5/23/18
to unma...@googlegroups.com

Hi Geraldine,

 

you have at least one observation at every site, then, as long as the assumptions of the model are being met, then everything is occupied. In this case, you can resort to a GLM and ask the question “what drives detectability”, but, when it comes to occupancy, you know your answer (everything is occupied) and there is no way to explore what drives occupancy*.

 

* assuming each site has at least one observation.

Reply all
Reply to author
Forward
0 new messages