Occupancy models for eDNA surveys (help with psi and p estimates)

166 views
Skip to first unread message

Ellery Ruther

unread,
Oct 17, 2016, 11:54:12 PM10/17/16
to unmarked

Hello! 
I am relatively new to occupancy modeling and Unmarked. I have perused this group and the manual, and have not found anything directly relevant to my problem. I greatly appreciate any help or advice!

 

Wood turtles (Glyptemys insculpta) are a semi-aquatic turtle species in North America, and are threatened and endangered across their range. We were attracted to environmental DNA (eDNA) sampling techniques because it had the potential to improve detection rate (cryptic and difficult-to-sample species), while reducing sampling costs at the same time. That being said, we developed our study design in 2012, before much of the eDNA literature (especially eDNA surveys using an occupancy framework) had been written. We surveyed for turtles during their aquatic period (found in streams and rivers) using an occupancy framework, in which we surveyed each site a total of three times across their active season. We only sampled eDNA during one of those three surveys. However, we did take three independent water samples, with 10 minutes in between each sample (& sterile equipment for each sample).

 

Our sampling framework looks like:
Turtle survey 1 (no eDNA sample taken)

Turtle survey 2 (eDNA sample taken; 3 independent samples) 

Turtle survey 3 (no eDNA sample taken)

 

I have run test models (using single season occupancy models), and not gotten occupancy probability results that make sense. The current estimate is around 0.99, however, there are not turtles in every stream. Psi for our turtle occupancy results is 0.65, so theoretically eDNA occupancy estimates should be similar.

 

I'm not sure if the issue is in the coding, or that an occupancy framework is not appropriate in this situation. 

 

I am running a simple single season occupancy model. I have 34 sites, 2-3 observations for each site. I fit a bunch of models using all combinations of 3 detection covariates for occupancy probability. Now, using the top model, I would like to calculate the occupancy probability and detection probability for the study area and calculate a 95% confidence interval.

 

#prepare list for detection covariates (covariates are turtle density, # days since last rainfall, and temperature during survey) 

obs.covs <- list(DLastRain = DLastRain,

                 DayofTemp = DayofTemp,

                 nden = nden)

 

#Prepare list for site covariates

site.covs <- NULL

 

#prepare list for countes of each survey

y <- rawdata[,c('s1','s2', 's3')]

 

#Set up data for analysis 

ednaUMF <- unmarkedFrameOccu(y = y, siteCovs = site.covs, obsCovs = obs.covs)

 

#model selection

mod1 <- occu(~ nden + DLastRain + DayofTemp ~1, ednaUMF) 

mod2 <- occu(~ nden + DLastRain ~1, ednaUMF) 

mod3 <- occu(~ nden + DayofTemp ~1, ednaUMF) 

mod4 <- occu(~ DLastRain + DayofTemp ~1, ednaUMF) 

mod5 <- occu(~ nden ~1, ednaUMF) 

mod6 <- occu(~ DLastRain ~1, ednaUMF) 

mod7 <- occu(~ DayofTemp ~1, ednaUMF) 

mod8 <- occu(~1 ~ 1, ednaUMF)

 

modlist <- fitList("Null"=mod8, "nden + DLastRain + DayofTemp"=mod1, "nden + DLastRain"=mod2, "nden + DayofTemp"=mod3, "DLastRain + DayofTemp"=mod4, "nden"=mod5, "DLastRain"=mod6, "DayofTemp"=mod8)

 

modSel(modlist, null="Null")

 

#use predict function for psi (state) and p (det) estimates

newdata <- data.frame(nden = seq(-3,3), length.out=100, DLastRain = seq(-3,3), length.out = 100)

predict(mod2, type="det", newdata=newdata)

predict(mod2, type="state", newdata=newdata)


> predict(mod2, type="det", newdata=newdata)

     Predicted           SE        lower        upper

1 1.921177e-37 2.970927e-36 1.319792e-50 2.796593e-24

2 1.597847e-25 1.659274e-24 2.313572e-34 1.103538e-16

3 1.328932e-13 7.051972e-13 4.042094e-18 4.369173e-09

4 9.952707e-02 2.905015e-02 5.531545e-02 1.726185e-01

5 1.000000e+00 5.293077e-11 9.999998e-01 1.000000e+00

6 1.000000e+00 1.300542e-22 1.000000e+00 1.000000e+00

7 1.000000e+00 2.362542e-34 1.000000e+00 1.000000e+00

 

> predict(mod2, type="state", newdata=newdata)

  Predicted          SE        lower upper

1 0.9999102 0.004141383 6.159445e-36     1

2 0.9999102 0.004141383 6.159445e-36     1

3 0.9999102 0.004141383 6.159445e-36     1

4 0.9999102 0.004141383 6.159445e-36     1

5 0.9999102 0.004141383 6.159445e-36     1

6 0.9999102 0.004141383 6.159445e-36     1

7 0.9999102 0.004141383 6.159445e-36     1


Any thoughts as to why psi is so high, and therefore p is so low? 


My current theories: a) low sample size AND too many NA's; 2) error due to the fact that detection covariates are identical across 3 eDNA sampling visits because they were all taken during the same turtle survey; 3) I needed to account for the three false negatives in my dataset somehow; 4) it's not a multi-level model, so I can't tell the model that eDNA is not present unless turtles are present (i.e. if we had taken eDNA samples during every turtle survey, I could have written a multi-level model like:

z ~ Bernoulli (psi) (occupancy probability of the species)

a | z ~ Bernoulli (z, psi2) (occupancy probability of eDNA as a function of the species being present)


Thank you very much for your help Unmarked community!!
Ellery


Ellery Ruther

Smithsonian Conservation Biology Institute

1500 Remount Rd, Front Royal, VA 22630

rut...@si.edu

edna_occ_test.csv
eDNA_occ_test.R

Brittany Mosher

unread,
Oct 18, 2016, 10:35:21 AM10/18/16
to unma...@googlegroups.com
Hi Ellery,
One issue you are having seems to be in "newdata".  The goal of creating a new dataframe there is to generate predicted psi and p estimates for some combination of covariates that is interesting to you. For mod2, which contains covariates nden and DLastRain, you have supplied values for each covariate that range from -3 to 3 and increase by 1, resulting in the 7 predicted values you see. (So the first detection estimate is the detection probability when turtle density is -3 and days since last rain is -3.) These values don't make sense for your situation, as both of these covariates should be positive (and nden never gets above 0.21 in your data).

Try picking some values that make more biological sense, and see what happens.  It is also interesting to me that DLRain is always the same for all 3 surveys. If the surveys were conducted on different days, it seems as though there should be come variation in that covariate at a single site.

Hope this helps somewhat.  I only ran your constant model (mod8), and psi = 0.34 and p = 0.57 so I think that most of your problem is with the newdata section.

Finally, I am wondering if you may have more information from the eDNA surveys than is currently present.  It would be interesting to compare the visual encounter/traditional survey detection probability to the eDNA detection probability, but right now you can't do that because you only have one eDNA survey per site "s2". You state that you took 3 eDNA surveys, which can be used as 3 sampling occasions -- right now it looks like you have collapsed them into one occasion.  You could even take it one step further, and if each eDNA sample was run in duplicate or triplicate during qPCR (they often are) you could use those subsample results rather than the sample results as your detection history. Just a thought.

Best, 
Brittany
-- 
Ph.D. Candidate
Department of Fish, Wildlife, and Conservation Biology
Colorado State University
My website (a work in progress)
brittan...@colostate.edu
          



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

Ellery Ruther

unread,
Oct 19, 2016, 11:12:39 PM10/19/16
to unmarked
Brittany,
Thank you for the reply!

I'm not sure why I didn't think of this earlier, but I have now identified the main problem that maybe you could help with.

Even when I used more appropriate values for the covariates (see example below), I was still getting a psi estimate of 0.99. I finally realized this is because the response variable (eDNA occupancy) is not independent from the predictor variable turtle density (i.e. there can be no eDNA where there aren't turtles). Typically when people run these models, they're multilevel models in which eDNA occupancy is a function of the species occupancy. Unfortunately we did not take eDNA during every turtle survey, only 1 of the 3. That's why it seems like I've collapsed the sampling occasions. 

I used Royle and Nichol's occupancy model that relates detection probability and abundance, but it did not change the results.

Any ideas about how to deal with this? 

newdata <- data.frame(nden = seq(0.00186,0.217487, length.out=100), DLastRain = seq(-1.0967,3.7454, length.out = 100))

Thanks!
Ellery
To unsubscribe from this group and stop receiving emails from it, send an email to unmarked+u...@googlegroups.com.

Matthew Smith

unread,
Dec 8, 2016, 7:55:16 PM12/8/16
to unmarked
Hello Ellery,

Let me see if I can help a little bit. Are the other s1 and s3, visual surveys? I think as you said there could be problems trying to relate detection covariates across different methods when not accounting for the differences in the methods. There is a paper, Nichols et al. 2008 that fits multi-method/multi-scale occupancy models that could be useful. Did you also conduct a visual survey during s2 when you took your eDNA sample? Depending on what questions you are interested in with this project, you could use your visual surveys with 3 replicate surveys in a single season occupancy model with the detection covariates of interest. Then in a separate single season model use your eDNA survey which is really 3 temporal replicates of the site (sample 1, 2, and 3) same as the visual surveys. This way you could incorporate detection covariates that are more appropriate for the particular method. Both models should address occupancy across the sites but using different methods where you could compare detection probabilities. I think this is what Brittany was getting at as well. 

Best,
Matt

--
Matthew M. Smith
M.S. Student, Natural Resources
School of the Environment
Washington State University
Reply all
Reply to author
Forward
0 new messages