databu: Simulated example for abundance model

Description Usage Format Details Source References Examples

Description

Simulated example for abundance model, see code below.

Usage

1

Format

A data frame with 1000 observations on the following 11 variables.

N

true counts

Y

observed counts

x1

random variables used as covariates

x2

random variables used as covariates

x3

random variables used as covariates

x4

random variables used as covariates

x5

random variables used as covariates

x6

random variables used as covariates

p

probability of detection

lambda

mean of the linear predictor

A

occupancy

phi

zero inflation probabilities

Details

This simulated example corresponds to the Binomial - ZIP model implemented in the function svabu.

Source

Simulated example.

References

Solymos, P., Lele, S. R and Bayne, E. 2011. Conditional likelihood approach for analyzing single visit abundance survey data in the presence of zero inflation and detection error. Environmetrics, 23, 197–205.

Solymos, P., Lele, S. R and Bayne, E. 2011. Abundance estimation in the presence of zero inflation and detection error using single visit data. Alberta Biodiversity Monitoring Institute, Alberta, Canada. Technical Report No. ABMI-20061, August 24, 2011. Available at: http://www.abmi.ca

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
data(databu)
str(databu)
## Not run: 
## simulation
n <- 1000
set.seed(1234)
x1 <- runif(n,0,1)
x2 <- rnorm(n,0,1)
x3 <- runif(n,-1,1)
x4 <- runif(n,-1,1)
x5 <- rbinom(n,1,0.6)
x6 <- rbinom(n,1,0.4)
x7 <- rnorm(n,0,1)
X <- model.matrix(~ x1 + x5)
Z <- model.matrix(~ x2 + x5)
Q <- model.matrix(~ x7)
beta <- c(2,-0.8,0.5)
theta <- c(1, 2, -0.5)
phi <- 0.3
p <- drop(binomial("logit")$linkinv(Z %*% theta))
lambda <- drop(exp(X %*% beta))
A <- rbinom(n, 1, 1-phi)
N <- rpois(n, lambda * A)
Y <- rbinom(n, N, p)
databu <- data.frame(N=N, Y=Y, x1, x2, x3, x4, x5, x6, p=p, lambda=lambda, A, phi)

## End(Not run)

detect documentation built on May 2, 2019, 4:50 p.m.