by Royle and Kéry 2007 - Environmental Statistics Group

Review of “A Bayesian State-space Formulation
of Dynamic Occupancy Models”
by Royle and Kéry 2007
Emily Wellington
Bio 504 Project
12/10/2010
In 2006, the use of a state-space formulation for modeling occupancy was not well
demonstrated, and the classical likelihood approach still enjoyed much support (i.e. MacKenzie et
al. 2003, Schmidt 2005, Weir et al. 2005). The introduction to Royle and Kery (2007) cites 12
papers from 2001-2005 that have discussed the problem of estimating site occupancy subject to
imperfect detection, where occupancy is the proportion of sites occupied (typically by a species) on
a given landscape, and detection is the observer’s record of presence or absence (P/A), which
includes a degree of error owing both to observer error and incomplete detection. Kery and Royle
describe a hierarchical parameterization of these models that parallel the state-space formulation
of models in time series. The state-space approach has two components: one for the partially
observable true occupancy process and the other for the observations conditional on that latent
state. The paper relates this representation to that found in time series settings (Jones 1993,
Berliner 1996).
Presence, extinction, and colonization of a species are common elements of conservation
and metapopulation biology. When collecting data for analysis of such elements, surveying for a
species introduces the problem of how well the survey actually estimates (detects) the true state of
nature (true occupancy) of a species on that site. This paper shows how such detection error can
actually be a useful part of the inference instead of a nuisance uncertainty as in inferences
conforming to classical likelihoods. In the past 5 years, Kery and Royle have, between them,
authored close to 40 scientific articles on the topics of demographic population analyses,
experimental design for animal and plant surveys, analysis of large-scale monitoring programs, and the
population ecology of rare species. Not only are they well-published but both have helped develop a
pedagogy that brings Bayesian modeling from the clerisy to a wider audience. Andrew Royle has
co-authored “Occupancy Estimation: Inferring Patterns and Dynamics of Species Occurrence”
(2005) and “Hierarchical Modeling and Inference in Ecology: The Analysis of Data from
Populations, Metapopulations, and Communities” (2008). Likewise, Marc Kery has recently
authored “Introduction to WinBugs for Ecologists: Bayesian approaches to regression, ANOVA,
mixed models, and related analyses” (2010).
Two different dynamic occupancy models are provided. Dynamic qualities of occupancy
include those that change across replicate samples, such as extinction and colonization at sites. The
first example takes presence/absence data from a bird species with irruptive population dynamics,
which also could have used conventional likelihood methods in PRESENCE or MARK as both
authors have tried in the past. The second example also uses occupancy data from a bird species but
allows for spatial heterogeneity. Demographic parameters vary randomly over space and time.
Parameters
Both examples assume occupancy is closed within, but not across primary periods (in this
case, the breeding season is the primary period). The primary parameters are: Occupancy ( Ψ =
probability of occupancy), Colonization (Ƴ = colonization probability from t to t+1), survival (Φ =
survival probability), and Detection (P t = detection probability)
In the second example, site effects that vary in space are proposed simply as {u, v, and w…}
that affect survival, colonization, and detection (refer to equation on page 1818; give examples
maybe—i.e. for the BBS, observers in Texas have different detection rates than an observer in
Virginia which would affect Pt …or, leaf drop in Texas precedes leaf drop in Virginia which would
affect visibility of the birds and affect detections)
For the state model, initial occupancy is simply z(i,1) ~ Ψ 1 for starting values at the sites.
All occupancy probabilities are equally likely on the first observation, so the prior on this parameter
is uniformly distributed. This uniform prior is weakly informative or ‘suitably vague’ in that the
uniform distribution is not wildly inappropriate. The observation model datasets for
presence/absence are large enough to forgive these non-empirical priors (each have several
hundred or more observations). Occupancy status of a site i in the next season t is assumed to
depend on the occupancy status of the previous season such that:
z(i,t)|z(i, t-1)~Bernoulli {z(i,t-1) Φt-1 +[1-z(i, t-1)]Ƴt-1
The observation model, conditional on the latent {z(i,t)} incorporates the detection
probability and thus:
yj(i,t)|z(i,t)~Bernoulli[z(i,t)pt]
(1)
(2)
To model covariates such as search effort, weather, or other environmental conditions, the
parameter pt can be transformed to pit.
Kery and Royle make a point of distinguishing between population and finite sample
inferences. The following estimation equation is included because sometimes researchers are
interested in the sample population surveyed instead of the larger population for which the model
estimates its parameters:.
Ψt(fs) =
𝟏
ℝ
𝚺i z(i,t)
(3)
Where fs means finite sample. One benefit of the state-space representation of the model is that it
easily makes these more precise estimates for the particular sample at hand. Creating the finite-
sample estimator employs the latent z(i,t) variable using Bayesian analysis and MCMC in
which a sample of each parameter is obtained from the target posterior which are then
together used to obtain summaries of the posterior such as mean and standard deviation.
This hierarchical computation of finite-sample occupancy relies on the state variable z,
which is not a component of the likelihood framework.
Although not explicitly stated, one may infer that the case-specific parameters used
in Kery and Royle’s models are those that vary over space (site effects or environmental
covariates) and time. In both models offered, parameters of turnover, survival,
colonization, and extinction are case-specific because they are related by the link function
of causal dynamics goverened by time. This is shown in equation (1)- for example, 𝛾t
depends on what z(t-1) was observed to be. The case-specific parameter of colonization
relies on the time dynamic to link it to another (specifically, the previous) case. The global
parameters used in this paper include initial occupancy (Ψ) and detection (p), which are
both Bernoulli distributed. The model is not set up like with an explicitly multi-level
hierarchical model because there appears to be nothing informing the global parameters.
However, the discrete Bernoulli distributed parameters z and p technically fall within the
domain of the beta distribution, which in this case has parameters of 𝛼 and 𝛽 of (0, 1).
Therefore one could be defensibly say that the model uses a uniform hyperprior.
Results/ Analysis – R and WinBUGS
R was used to analyze the data, and WinBugs was used in batch mode using the library addon R2WinBUGS to execute the data and provide statistics. Communication with Andrew Royle
yielded some data with which to run the Crossbill model. The replication results show similar
values as the authors’ (table1); changing burn in did little to the confidence intervals or the means
(table 2). Errors increased when iterations were decreased (table 3), but when the number of
iterations was increased from 1100 to 3300, the standard deviations of the parameters decreased
in the hundredths and thousandths places and the 97.5 intervals also improved slightly, though run
time increased by 50% (15 seconds; data not shown). It may have been interesting to change the
inverse gamma prior to a uniform one as was recommended by Gelmann such an exploration is
precluded by lack of data.
Table 1. Model run as originally scripted
node
mean
deviance
sd
MC error
2.50%
median
97.50%
start
sample
1518
36.9
1.343
1450
1518
1593
51
1500
gamma[1]
0.2606
0.0378
0.001256
0.1891
0.2589
0.3381
51
1500
gamma[2]
0.1899
0.04035
0.001481
0.112
0.1894
0.2709
51
1500
gamma[3]
0.07031
0.02908
0.001256
0.01966
0.06831
0.13
51
1500
p[1]
0.5847
0.04455
0.001498
0.4938
0.5854
0.6668
51
1500
p[2]
0.4915
0.03743
0.001294
0.4219
0.4911
0.5654
51
1500
p[3]
0.5658
0.0316
9.94E-04
0.5034
0.5655
0.6283
51
1500
p[4]
0.5741
0.03704
0.001287
0.5019
0.5729
0.6468
51
1500
phi[1]
0.8066
0.07052
0.002755
0.6556
0.8108
0.9304
51
1500
phi[2]
0.8551
0.04717
0.001533
0.7524
0.8576
0.9424
51
1500
phi[3]
0.6815
0.05163
0.001797
0.5818
0.6803
0.7814
51
1500
Table 2. Outputs from a repeat run by another user, where the node notations are the same as are
specified in Table 1.
node
deviance
mean
sd
MC error
2.50%
median
97.50%
start
sample
1519
37.42
1.462
1449
1518
1595
101
1350
gamma[1]
0.2603
0.0382
0.001264
0.1891
0.2585
0.3381
101
1350
gamma[2]
0.1899
0.04022
0.001255
0.1123
0.1891
0.2687
101
1350
gamma[3]
0.07007
0.02887
0.001155
0.0185
0.06847
0.1299
101
1350
p[1]
0.5849
0.04463
0.001622
0.4934
0.5854
0.6665
101
1350
p[2]
0.4916
0.03792
0.001491
0.4221
0.4911
0.5669
101
1350
p[3]
0.5654
0.03178
0.001088
0.5029
0.5648
0.6283
101
1350
p[4]
0.5738
0.03729
0.001358
0.5005
0.5724
0.6473
101
1350
phi[1]
0.8064
0.07127
0.003195
0.6521
0.8109
0.9305
101
1350
phi[2]
0.8554
0.04687
0.001645
0.7502
0.8582
0.9424
101
1350
phi[3]
0.6812
0.05196
0.002019
0.5793
0.6797
0.7823
101
1350
Table 3. Outputs from a repeat run by another user with few iterations
node
deviance
mean
sd
MC error
2.50%
median
97.50%
start
sample
1520
38.7
2.424
1446
1519
1599
26
675
gamma[1]
0.2602
0.03663
0.001487
0.1881
0.2594
0.3358
26
675
gamma[2]
0.1909
0.03985
0.001766
0.1131
0.1911
0.2745
26
675
gamma[3]
0.07082
0.02872
0.001413
0.02295
0.06904
0.1308
26
675
p[1]
0.5845
0.04569
0.002021
0.4885
0.5869
0.6695
26
675
p[2]
0.4935
0.03706
0.001822
0.4175
0.4951
0.5696
26
675
p[3]
0.5636
0.03107
0.001557
0.5025
0.5644
0.6279
26
675
p[4]
0.5687
0.0361
0.001904
0.4934
0.5702
0.6358
26
675
phi[1]
0.8053
0.06764
0.004093
0.6632
0.8084
0.9221
26
675
phi[2]
0.8542
0.04702
0.002544
0.7532
0.8568
0.939
26
675
phi[3]
0.6864
0.05544
0.002837
0.5758
0.685
0.7939
26
675
Figure 1. Traces
At the time of its publication, Dynamic Occupancy Models represented both a novel and an
integral contribution to a subject matter which, today, is burgeoning yet highly derivative in that it
lacks the originality of the foundational earlier research upon which it relies. Kery and Royle’s
state-space formulation makes use of emergent advances in species distribution modeling. They
assert that their progressive approach has the strengths of a state-space formulation as well as the
advantages of hierarchical models that directly incorporate covariates and parameter
transformations. Freshly popular with today’s authors and reviews, Kery and Royle’s inclusion of a
supplement appendix and model specification shows commendable insight. Furthermore, the
authors depict their esoteric approach with flawless diction, allowing a frequently technical topic to
comport as elegant yet concise. Dynamic Occupancy Models represents progress in the field of
demographic population analysis.
References
Gelman, A. 2006. Prior distributions for variance parameters in hierarchical models. Bayesian
Analysis (2006) 1, Number 3, pp. 515–533
MacKenzie, D. I., J.D. Nichols, J.E. Hines, M.G. Knutson, and A.D. Franklin. 2003. Estimating site
occupancy, colonization, and local extinction when a species is detected imperfectly. Ecology
84:2200-2207
Schmidt, B.R. 2005. Monitoring the distribution of pond-breeding amphibians when species
are detected imperfectly. Aquatic Conservation: marine and Freshwater Ecosystems
15:681-692
Weir, L. A., J. A. Royle, P. Nanjappa, and R. E. Jung. 2005. Modeling anuran detection and site
occupancy on North American Amphibian Monitoring Program (NAAMP) routes in
Maryland. Journal of Herpetology 39(4): 627-639