Skip to content

raerickson/occupancy_correlated_error

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Occupancy model with error structure

This code may be used to fit Bernoulli-binomial models with latent group effects on both the Bernoulli and binomial parameters, where the former may be seasonally dependent. This model may be used to fit site (sampling unit) occupancy models, where the Bernoulli and binomial parameters and the grouping factor denote the probability of site occupancy, conditional probability of species detection, and seasons, respectively. We also include code which may be used for a calibration study of model performance.

Citation: Gray, Brian and Richard Erickson, 2019, R and SAS occupancy correlated area code, U.S. Geological Survey code release, https://doi.org/10.5066/P9ABEKOL.

Code overview

This README file describes how to use this code. The SAS_code folder contains the SAS code for running the model and the R_code file contains the R code for running the model. The model_evalulation file contains the code used to evaluate the model.

Files

The following files are contained in this repository:

  • README.md is this file.
  • LICENSE.md is the Official USGS License.
  • R_code is a folder that contains the following files:
    • example_simulate_data.R is R code that simulates data and recovers it
    • example_data.R fits the example from the paper using R and RStan
    • occupancy_correlated_error.stan is the model code in Stan.
  • SAS_code is a folder that contains the following files:
    • case study create dataset 191010.sas is a SAS file that may be used to modify data downloaded from here. This file is not needed to fit the case study model.
    • case study fit models 200430.sas is a SAS file that may be used to create case study results
    • ZIB with AR1 200430.sas is a SAS file that may be used to reproduce simulation results
  • data denotes the following data files:
    • MYSP2P8BWC.csv raw data that is summarized in MYSP2smplyr.csv (and which may be downloaded from here). Metadata associated with these data are here.
    • MYSP2smplyr.csv a summary of MYSPE2P8BWC.csv used for the case study.
  • code.json is the code metadata.
  • Contributing.md describes how to contribute to this project.
  • Disclaimer.md is the standard USGS disclaimer.

Contacts

Brian R. Gray ([email protected]) for the overall project and SAS code questions.

Richard A. Erickson ([email protected]) for the R and RStan code.

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •