Code and data for the analyses described in the paper:
Zachmann, L.J., Borgman, E.M., Witwicki, D.L. et al. Bayesian Models for Analysis of Inventory and Monitoring Data with Non-ignorable Missingness. JABES (2021). https://doi.org/10.1007/s13253-021-00473-z
First, clone the repo, cd
into the project directory, then use the shell script get-inputs.sh to obtain the various "protected" data assets used in the example analyses. The data live on the NPS Data Store. get-inputs.sh uses wget
to download the zip file, unpack its contents, and move data files and directories to their appropriate location in the file tree.
git clone https://github.com/nationalparkservice/bayes-for-non-ignorable-designs.git
cd bayes-for-non-ignorable-designs
./get-inputs.sh
Windows users will likely need Git Bash to run the commands above. Git Bash does not come with wget
preinstalled. To intall wget
, follow these directions.
R and JAGS. Specifically, we make use of the following R packages: abind, rjags, coda, HDInterval, spsurvey, tidyverse, hrbrthemes, ggridges, and cowplot.
If you'd like to use Docker to avoid issues with dependencies, you can build and launch an RStudio Server instance using:
./docker/run.sh
The above command assumes you have already cloned the repo and have cd
'ed into the project directory. Once the container is running, simply open your browser to http://localhost:8787/ using "bayes" as username and password.
Study area, missingness in space and time.
Study area | Spatial | Temporal |
---|---|---|
Figure 3 | Figure 4 |
---|---|
Figure 5a | Figure 5b | Figure 5c |
---|---|---|
Figure 6a | Figure 6b |
---|---|
- The JAGS models utilize a notation that differs subtly from the model math as it appears in the manuscript. For instance, the intercept and trend slope coefficients – the
$\boldsymbol{\alpha}_k$ terms in the manuscript – appear asB[j, 1, k]
andB[j, 2, k]
, respectively. Likewise, we usex
andX
in place of$t$ and$\textbf{W}$ . - Though we discuss variography in the manuscript, we do not include information on the spatial location of individual sites here in order to protect the confidentiality of the data.
- For purposes of clarity, and to meet page constraints, we omitted some details about the censored and truncated canopy gap size data. Specifics are included in a README for the censored and truncated data example.
- The RNG and other hidden state in your programming environment might cause results to differ subtly from those appearing in the manuscript -- the qualitative inference and conclusions drawn should not.
Authors: Luke Zachmann*, Tom Hobbs, Erin Borgman, Dana Witwicki, Megan Swan, Cheryl McIntyre, and Carolyn Livensperger
* maintainer (lzachmann@gmail.com)
The assets directory is tracked using Git LFS, which we set up using git lfs track "assets/**"
(quotes required to avoid shell expansion).