2.3 Prediction of pond inundation states using hidden Markov
models
We used hidden Markov models (HMMs) to detect temporal shifts in daily
temperature standard deviations (tSDs) measured from the temperature
sensors, which can be used to infer pond filling and drying events. The
simplest HMMs partition datasets into 2 categories; in our study, the
two categories represent distinct wet and dry states. However, Anderson
et al. (2015) showed that seasonal fluctuation, canopy cover, pond
vegetation, and water depth can influence temperature variance readings
from temperature loggers placed in wetland basins, and that loggers in
relatively deeper water have lower variance than those in shallower
water. Use of HMMs with >2 states can help resolve this
variation among dry-wet states, improving classifications. We therefore
fit both 2-state and 3-state HMMs to both of our datasets, with the
former modeling a simple scenario of distinct dry and wet states, and
the latter factoring in the potential for additional wet, dry, or
intermediate damp states.
In order to test whether a single logger (e.g., one in a pond without a
control outside the pond) is sufficient to capture inundation states, we
also compared two different datasets for each study site: one using
temperature data from the paired pond and control loggers, calculated by
subtracting the tSDs of the pond loggers from the tSDs of control
loggers (wherein a value of 0 indicates no difference in daily tSD
between the pond and air temperatures), and another using tSDs from pond
loggers only.
We used a custom script in R v3.6.1 (R Development Core Team, 2018) to
calculate tSDs measured by each temperature logger. We then used the
package depmixS4 v1.4.0 (Visser & Speekenbrink, 2010) in R to fit HMMs.
Because applying HMMs forces each dataset into the designated number of
states, even in the absence of a true wet state, we used the HMM
parameter estimates to determine appropriate tSD thresholds to designate
each state as “wet” or “dry” for both datasets. We then compared the
predicted states to the known states of the ponds during our four site
visits (Tables S2 and S3).