Hello all,
I am very new to r and unmarked but I am trying to run a single season, site occupancy model for my master thesis.
I have data from 89 sites with 23 surveys of each. There were only 6 detections in 6 different sites. When I am trying to run the Null model, without covariates, the occupancy always comes out at 1. I am wondering if there is a problem with the small sample size or perhaps the code?
I am running the code as follows:
>df<- read.csv("detect_data.csv",
row.names = "X")
>umf<- unmarkedFrameOccu(y = as.matrix(df))
unmarkedFrame Object
89 sites
Maximum number of observations per site: 23
Mean number of observations per site: 23
Sites with at least one detection: 6
Tabulation of y observations:
0 1
2041 6
>fm<- occu(formula = ~1
~1,
data = umf)
Call:
occu(formula = ~1 ~ 1, data = umf)
Occupancy (logit-scale):
Estimate SE z P(>|z|)
23.4 3537 0.00662 0.995
Detection (logit-scale):
Estimate SE z P(>|z|)
-5.83 0.409 -14.3 3.99e-46
AIC: 85.97085
Number of sites: 89
optim convergence code: 0
optim iterations: 24
Bootstrap iterations: 0
>backTransform(fm, type = "state")
Backtransformed linear combination(s) of Occupancy estimate(s)
Estimate SE LinComb (Intercept)
1 2.41e-07 23.4 1
Transformation: logistic
> backTransform(fm, type = 'det')
Backtransformed linear combination(s) of Detection estimate(s)
Estimate SE LinComb (Intercept)
0.00293 0.00119 -5.83 1
Transformation: logistic
> boot::inv.logit(coef(fm)[1])
psi(Int)
1
Any help would be really appreciated!
Thanks,
Shona