> set.seed(36837)
>
> R <- 50 # number of transects
> T <- 5 # number of replicates
> strip.width <- 50
> transect.length <- 100
> breaks <- seq(0, 50, by=10)
>
> lambda <- 5 # Abundance
> phi <- 0.6 # Availability
> sigma <- 30 # Half-normal shape parameter
>
> J <- length(breaks)-1
> y <- array(0, c(R, J, T))
> for(i in 1:R) {
+ M <- rpois(1, lambda) # Individuals within the 1-ha strip
+ for(t in 1:T) {
+ # Distances from point
+ d <- runif(M, 0, strip.width)
+ # Detection process
+ if(length(d)) {
+ cp <- phi*exp(-d^2 / (2 * sigma^2)) # half-normal w/ g(0)<1
+ d <- d[rbinom(length(d), 1, cp) == 1]
+ y[i,,t] <- table(cut(d, breaks, include.lowest=TRUE))
+ }
+ }
+ }
> y <- matrix(y, nrow=R) # convert array to matrix
> umf <- unmarkedFrameGDS(y = y, survey="line", unitsIn="m",
+ dist.breaks=breaks, tlength=rep(transect.length, R), numPrimary=T)
> summary(umf)
unmarkedFrame Object
50 sites
Maximum number of observations per site: 25
Mean number of observations per site: 25
Number of primary survey periods: 5
Number of secondary survey periods: 1
Sites with at least one detection: 50
Tabulation of y observations:
0 1 2 3 4 <NA>
838 334 65 12 1 0
> m1 <- gdistsamp(~1, ~1, ~1, umf, output="density")
> summary(m1)
Call:
gdistsamp(lambdaformula = ~1, phiformula = ~1, pformula = ~1,
data = umf, output = "density")
Abundance (log-scale):
Estimate SE z P(>|z|)
1.53 0.125 12.2 1.89e-34
Availability (logit-scale):
Estimate SE z P(>|z|)
0.519 0.318 1.63 0.103
Detection (log-scale):
Estimate SE z P(>|z|)
3.44 0.0706 48.8 0
AIC: 1812.616
Number of sites: 50
optim convergence code: 0
optim iterations: 38
Bootstrap iterations: 0
> backTransform(m1, type="lambda")
Backtransformed linear combination(s) of Abundance estimate(s)
Estimate SE LinComb (Intercept)
4.6 0.574 1.53 1
Transformation: exp
> backTransform(m1, type="phi")
Backtransformed linear combination(s) of Availability estimate(s)
Estimate SE LinComb (Intercept)
0.627 0.0745 0.519 1
Transformation: logistic
> backTransform(m1, type="det")
Backtransformed linear combination(s) of Detection estimate(s)
Estimate SE LinComb (Intercept)
31.3 2.21 3.44 1
Transformation: exp
--
Manuel Spínola, Ph.D.
Instituto Internacional en Conservación y Manejo de Vida Silvestre
Universidad Nacional
Apartado 1350-3000
Heredia
COSTA RICA
mspi...@una.ac.cr
mspin...@gmail.com
Teléfono: (506) 2277-3598
Fax: (506) 2237-7036
Personal website:
Lobito de río
Institutional website:
ICOMVIS