Skip to main content

Know what you don't know: Embracing state uncertainty in disease-structured multistate models

Cite this dataset

Hollanders, Matthijs; Royle, J. Andrew (2022). Know what you don't know: Embracing state uncertainty in disease-structured multistate models [Dataset]. Dryad.


Hidden Markov models (HMMs) are broadly applicable hierarchical models that derive their utility from separating state processes from observation processes yielding the data. Multistate models such as mark-recapture and dynamic multistate occupancy models are examples of HMMs that are frequently used in ecology. In their early formulations, states, such as pathogen infection status, were assumed to be perfectly observed without ambiguity in state assignment. However, state uncertainty is a pervasive feature of many ecological systems, and multievent models were developed to explicitly account for it.

We developed a novel extended multievent mark-recapture model that incorporates state uncertainty at multiple levels of detection. Using a disease-structured example, both false-negative and false-positive state assignment errors are modeled at two levels of state assignment---the pathogen sampling process and the diagnostic process that samples are subjected to. We additionally describe methods to jointly model infection intensity to integrate heterogeneity in ecological parameters, such as survival, and the pathogen detection processes. We provide code to simulate and analyze datasets with various underlying ecological processes and fit our model to a mark-recapture dataset of Mixophyes fleayi (Fleay's barred frog) infected with the amphibian chytrid fungus (Batrachochytrium dendrobatidis, Bd).

In our case study, we found evidence for various state assignment errors: the sampling protocol performed poorly in detecting Bd, pathogen detection was highly dependent on infection intensity, and false-positives were non-negligible. Incorporating state uncertainty yielded significantly higher estimates of infection prevalence and 4--5 times lower rates of infection state transitions compared to those obtained from a traditional multistate model.

Our results highlight that incorporating state assignment errors improves inference on the ecological state process, especially when sensitivity and specificity of the state assignment processes are low. The general model structure can be applied to other HMMs, providing a foundation for modeling state uncertainty in a range of related models. --


Weekly surveys for juvenile Fleay's barred frog (Mixophyes fleayi) were conducted over a 3.5-month period at Brindle Creek, Border Ranges National Park, New South Wales, Australia. There were two missing surveys (so with a biweekly interval instead of a weekly interval) which were padded with NAs in the capture history. Recaptured individuals were swabbed for Bd, DNA was extracted using Prepman Ultra, and DNA was amplified and quantified using qPCR and GeneBlocks synthetic gene fragments. See the README for more details on the data.

Data were analysed with the novel multievent model and a traditional Arnason-Schwarz model (see manuscript and code) using NIMBLE 0.12.2 in R 4.2.1.


Australian Research Council, Award: DP180101415