Help with model fitting in secr

113 views
Skip to first unread message

allant...@gmail.com

unread,
Apr 1, 2022, 5:28:32 AM4/1/22
to secr
Hello everyone

I am new to secr and would like to generate population statistics for a spotted hyena dataset collected using camera traps. I have written and run the code but my results are not intuitive or comparable to a parallel analysis I ran in Program CAPTURE. The secr analysis returns a density of 5.5 hyenas per ha which is significantly different to the 0.00233 animals per ha that I got from CAPTURE. Attached are the input files and R code that I used and a Word file with highlighted screenshots of the R output that I find need help with for your reference.

Kind regards,
Allan.
CaptSECR.txt
MalHyena.R
TrapSECR.txt
SECR query.docx

Murray Efford

unread,
Apr 4, 2022, 10:56:26 PM4/4/22
to secr
Hello Allan

Ahh. Your R code analyses 'captdata' that is a builtin dataset with simulated animals at about 5.5/ha (see ?captdata)! I also find two probably typos in TrapSECR.txt (missing initial 3 of x-coordinates T13, T72). And you will need a much larger buffer (I suggest 20000). Then

MalHyena.0 <- secr.fit (MalHyena, model = list(g0 ~ 1), buffer = 20000, details=list(fastproximity = FALSE))
 predict(MalHyena.0)
       link     estimate  SE.estimate          lcl          ucl
D       log 1.226085e-03 2.392799e-04 8.393676e-04 1.790974e-03
g0    logit 2.665433e-02 5.931733e-03 1.719303e-02 4.110439e-02
sigma   log 5.085863e+03 6.426653e+02 3.974019e+03 6.508777e+03


I used fastproximity=FALSE as it looks like you will want to compare models with time-varying probabilities.
Murray

allant...@gmail.com

unread,
Apr 5, 2022, 6:15:07 AM4/5/22
to secr
Hi Murray

Thanks so much for your help, very much appreciated. I reran the analysis using the code specifications you provided in your response and reproduced the same result.
However, given a study area size of 490 km2, I feel that a buffer of 20000 (i.e. 20 km) would make the effective sampled area too big resulting in an underestimate of the density. Specifying a buffer of 2000 (i.e. a strip of 2 km around the trapping array) would be more realistic but returns the following message:

Warning messages:
1: In bias. D(buffer, temptrps, detectfn = output$detectfn, detectpar = dpar,  :
  bias. D() does not allow for variable effort (detector usage)
2: In buffer bias check (output, buffer, bias Limit) :
  predicted relative bias exceeds 0.01 with buffer = 2000

A buffer of 20000 gives a density of 12.26 hyenas/100 km2 (which seems like an underestimate) while that of 2000 gives a density of 21.67 animals/100 km2, which I believe is more practical and comparable to the Program CAPTURE estimate of 23.27 hyenas/100 km2.
Does the above warning message render the result technically incorrect?

Regards,
Allan.

Murray Efford

unread,
Apr 5, 2022, 1:29:13 PM4/5/22
to secr
moves.png
CAPTURE does not have a reliable method for estimating density from your data, so the comparison is unhelpful. Your animals are very mobile so you need a large buffer unless there is a known boundary to the habitat. See secr-habitatmasks.pdf. The buffer does _not_ define an ETA.

Allan Tarugara

unread,
Apr 5, 2022, 2:43:34 PM4/5/22
to Murray Efford, secr
Hi Murray

Thanks once again for the helpful response. I will refer to secr-habitatmasks.pdf for more information. Yes the game reserve is electric fenced in its entirety and generally restricts hyena movement in and out of the reserve.

Regards,
Allan.
--
You received this message because you are subscribed to a topic in the Google Groups "secr" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/secrgroup/o2xzdn9zCGY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to secrgroup+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/secrgroup/861b964c-39c4-4e2c-9d68-97ecf2ee2c2cn%40googlegroups.com.
<moves.png>

Murray Efford

unread,
Apr 5, 2022, 4:55:26 PM4/5/22
to secr
Then you may want to forget about buffers and use a predefined mask limited to the extent of the fenced reserve.
Murray
Reply all
Reply to author
Forward
0 new messages