svocc: ZI Binomial model with single visit

Description Usage Arguments Details Value Author(s) References Examples

Description

ZI Binomial model with single visit

Usage

1
2
3
4
5
6
7
8
svocc(formula, data, link.sta = "cloglog", link.det = "logit", penalized = FALSE, 
method = c("optim", "dc"), inits, 
model = TRUE, x = FALSE, ...)
svocc.fit(Y, X, Z, link.sta = "cloglog", link.det = "logit", penalized = FALSE, 
auc = FALSE, method = c("optim", "dc"), inits, ...)
extractMLE(object, ...)
svocc.step(object, model, trace = 1, steps = 1000, 
criter = c("AIC", "BIC", "cAUC"), test = FALSE, k = 2, control, ...)

Arguments

formula

formula of the form y ~ x | z, where y is a vector of observations, x is the set of covariates for the occurrence model, z is the set of covariates for the detection model

Y, X, Z

vector of observation, design matrix for occurrence model, and design matrix for detection model

data

data

link.sta, link.det

link function for the occurrence (true state) and detection model

penalized

logical, if penalized likelihood estimate should be computed

method

optimization or data cloning to be used as optimization

inits

initial values

model

a logical value indicating whether model frame should be included as a component of the returned value, or true state or detection model

x

logical values indicating whether the response vector and model matrix used in the fitting process should be returned as components of the returned value

auc

logical, if AUC should be calculated

object

a fitted model object

trace

info returned during the procedure

steps

max number of steps

criter

criterion to be minimized (cAUC=1-AUC)

test

logical, if decrease in deviance should be tested

k

penalty to be used with AIC

control

controls for optimization, if missing taken from object

...

other arguments passed to the functions

Details

See Examples.

The right hand side of the formula must contain at least one continuous (i.e. non discrete/categorical) covariate. This is the necessary condition for the single-visit method to be valid and parameters to be identifiable. See References for more detailed description.

Value

An object of class 'svocc'.

Author(s)

Peter Solymos and Monica Moreno

References

Lele, S.R., Moreno, M. and Bayne, E. 2011. Dealing with detection error in site occupancy surveys: What can we do with a single survey? Journal of Plant Ecology, 5(1), 22–31.

Moreno, M. and Lele, S. R. 2010. Improved estimation of site occupancy using penalized likelihood. Ecology, 91, 341–346.

Lele, S. R., Moreno, M. and Bayne, E. 2011. Dealing with detection error in site occupancy surveys: What can we do with a single survey? Alberta Biodiversity Monitoring Institute, Alberta, Canada. Technical Report No. ABMI-20060, 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
data(datocc)
## MLE
m00 <- svocc(W ~ x1 | x1 + x3, datocc)
## PMLE
m01 <- svocc(W ~ x1 | x1 + x3, datocc, penalized=TRUE)

## print
m00
## summary
summary(m00)
## coefficients
coef(m00)
## state (occupancy) model estimates
coef(m00, "sta")
## detection model estimates
coef(m00, "det")
## compare estimates
cbind(truth=c(0.6, 0.5, 0.4, -0.5, 0.3), 
mle=coef(m00), pmle=coef(m01))

## AIC, BIC
AIC(m00)
BIC(m00)
## log-likelihood
logLik(m00)
## variance-covariance matrix
vcov(m00)
vcov(m00, model="sta")
vcov(m00, model="det")
## confidence intervals
confint(m00)
confint(m00, model="sta")
confint(m00, model="det")

## fitted values
## (conditional probability of occurrence given detection history:
## if W=1, fitted=1,
## if W=0, fitted=(phi*(1-delta)) / ((1-delta) + phi * (1-delta))
summary(fitted(m00))
## estimated probabilities: (phi*(1-delta)) / ((1-delta) + phi * (1-delta))
summary(m00$estimated.probabilities)
## probability of occurrence (phi)
summary(m00$occurrence.probabilities)
## probability of detection (delta)
summary(m00$detection.probabilities)

## Not run: 
## model selection
m02 <- svocc(W ~ x1 | x3 + x4, datocc)
m03 <- drop1(m02, model="det")
## dropping one term at a time, resulting change in AIC
m03
## updating the model
m04 <- update(m02, . ~ . | . - x4)
m04
## automatic model selection
## part of the model (sta/det) must be specified
m05 <- svocc.step(m02, model="det")
summary(m05)

## nonparametric bootstrap
m06 <- bootstrap(m01, B=25)
attr(m06, "bootstrap")
extractBOOT(m06)
summary(m06, type="mle")
summary(m06, type="pmle") ## no SEs! PMLE!!!
summary(m06, type="boot")
## vcov
#vcov(m06, type="mle") ## this does not work with PMLE
vcov(m06, type="boot") ## this works
## confint
confint(m06, type="boot") ## quantile based

## parametric bootstrap
## sthis is how observations are simulated
head(simulate(m01, 5))
m07 <- bootstrap(m01, B=25, type="param")
extractBOOT(m07)
summary(m07)

data(oven)
ovenc <- oven
ovenc[, c(4:8,10:11)][] <- lapply(ovenc[, c(4:8,10:11)], scale)
ovenc$count01 <- ifelse(ovenc$count > 0, 1, 0)
moven <- svocc(count01 ~ pforest | julian + timeday, ovenc)
summary(moven)
drop1(moven, model="det")
moven2 <- update(moven, . ~ . | . - timeday)
summary(moven)

BIC(moven, moven2)
AUC(moven, moven2)
rocplot(moven)
rocplot(moven2, col=2, add=TRUE)

## End(Not run)

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