Occupancy estimate per site

74 views
Skip to first unread message

Yuri Kaneoya Arcova

unread,
May 7, 2024, 4:04:21 PMMay 7
to unmarked
Hi guys, I hope you can help me.

 On single species- single season model, unmarked presents one single value for occupancy(psi) and one for detectability (p). I also need  the psi and p for each individual site but don't know how. 

Appreciate it in advance.

Yuri

Jim Baldwin

unread,
May 7, 2024, 4:43:44 PMMay 7
to unma...@googlegroups.com
If you only have a single value for each, then those are the values for every site.  Your model would need to include covariates to have varying estimates for each site.  Sharing your model would allow for more specific advice.

Jim


--
*** 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/f92b5dc6-762d-4ecb-b2a4-527ff3b398ean%40googlegroups.com.

Yuri Kaneoya Arcova

unread,
Jun 17, 2024, 2:53:22 PMJun 17
to unmarked
Hey Jim. Thanks for your answer. 

But what I actually mean, is that unmarked provides one single value for the model (an average), even though I have for exemple, 12 sampling units. I'm now interested in each of the psi and p value per sampling unit. How do I do that? 

Thank you once again. 

Yuri

Yuri Kaneoya Arcova

unread,
Jun 25, 2024, 2:55:19 AM (12 days ago) Jun 25
to unmarked


Here is the script, and the detection history :

Unit S1 S2 S3 S4 S5 S6 S7 S8 S9 S10 S11 S12 S13 S14 S15 S16 S17 S18 S19 S20 S21 S22 S23 S24 S25 S26 S27 S28 S29
1 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0
2 0 0 0 1 1 0 0 0 1 1 1 1 1 0 1 1 0 1 1 0 1 0 0 0 0 0 0 0 0
3 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
5 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
6 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
8 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
9 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
10 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 0
11 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
12 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0



Script: 

library(unmarked)

dados=read.delim("ocupacao_semana.csv", sep=";", header=TRUE)
amb=read.delim("variaveis.csv", sep=";", header=TRUE)


dados <- dados[ -c(1) ]
amb<-amb[ -c(1) ]


dados_oficial <- unmarkedFrameOccu(y = as.matrix(dados))
summary(dados_oficial)

m2 <- unmarkedFrameOccu(y = as.matrix(dados), siteCovs = amb)
summary(m2)
m1 <- occu(formula =~1~1, data = dados_oficial)   
summary(m1)                                      


predict(m1, newdata = data.frame(site = 1), type = "state")
predict(m1,  newdata = data.frame(site = 1), type = "det")


boot::inv.logit(coef(m1)
boot::inv.logit(coef(m1)


mf <- occu(formula = ~X + Y ~X + A+ Y+P , data = m2, se=TRUE)
summary(mf)

predict(mf, newdata = data.frame(site = 1), type = "state")

Yaelle Blais

unread,
Jul 4, 2024, 8:50:41 AM (2 days ago) Jul 4
to unmarked
Hello Yuri, 

Have you tried this code :
predict(mf, type = "state")

It should give you the psi for your 12 sites

Best, 

Yaelle Blais

Reply all
Reply to author
Forward
0 new messages