This READ_ME.txt file was generated on August 29, 2019 by Fabiola Iannarilli ------------------- GENERAL INFORMATION ------------------- 1. Title: Data, R Code, and Output Supporting “Using lorelograms to measure and model correlation in binary data: Applications to ecological studies” 2. Author Information Name: Fabiola Iannarilli Institution: Conservation Sciences Graduate Program Department of Fisheries, Wildlife, and Conservation Biology Address: University of Minnesota-Twin Cities, St. Paul, Minnesota, USA Email: ianna014 [at] umn.edu Name: Todd W. Arnold Institution: Department of Fisheries, Wildlife, and Conservation Biology Address: University of Minnesota-Twin Cities, St. Paul, Minnesota, USA Email: arnol065 [at] umn.edu Name: John Erb Institution: Minnesota Department of Natural Resources Address: Minnesota DNR - Northeastern Region Headquarters, Grand Rapids, Minnesota, USA Email: john.erb [at] state.mn.us Name: John R. Fieberg Institution: Department of Fisheries, Wildlife, and Conservation Biology Address: University of Minnesota-Twin Cities, St. Paul, Minnesota, USA Email: jfieberg [at] umn.edu 3. Date of data collection: Sep 1st - Oct 31 2016 4. Geographic location of data collection: Northeastern Minnesota 5. Information about funding sources that supported the collection of the data: This project was funded in part by the Minnesota Department of Natural Resources and the Wildlife Restoration Program (Pittman-Robertson). -------------------------- SHARING/ACCESS INFORMATION -------------------------- 1. Licenses/restrictions placed on the data: These data are protected under a Creative Commons Attribution-NonCommercial-ShareAlike International 4.0 license. 2. Links to publications that cite or use the data: Iannarilli, F. , Arnold, T. W., Erb, J. and Fieberg, J. R. (2019), Using lorelograms to measure and model correlation in binary data: Applications to ecological studies. Methods Ecol Evol. Accepted Author Manuscript. doi:10.1111/2041-210X.13308 3. Recommended citation for the data: Iannarilli, Fabiola; Arnold, Todd W; Erb, John; Fieberg, John R. (2019). Data, R Code, and Output Supporting: Using lorelograms to measure and model correlation in binary data: Applications to ecological studies. Retrieved from the Data Repository for the University of Minnesota, https://doi.org/10.13020/q3y6-h459. --------------------- DATA & FILE OVERVIEW --------------------- File List The compressed folder 'Iannarilli_et_al_Data_Code_and_Output' contains data, R scripts, and relative output files (figures and htmls files) to reproduce figures and results reported in Iannarilli F et al. (in press). We recommend users to unzip the folder in the desired working directory and use the R user interface RStudio (RStudio Team 2018) to reproduce the analysis. Clicking the 'Iannarilli_et_al_Data_Code_and_Output.Rproj' file will directly open the RStudio interface and will allow users to navigate through the different R scripts and select the code to reproduce the analysis. More information on how to use a project in RStudio are available at: https://support.rstudio.com/hc/en-us/articles/200526207-Using-Projects. Below, details on the files contained in the compressed folder: 1. The subfolder 'data_input' contains: A. Bobolink_GrayCatbird_BCR23_2010.csv = data set containing data on Bobolink (Dolichonyx oryzivorus) and Gray Catbird (Dumetella carolinensis) collected by the North America Breeding Bird Survey (Pardieck et al. 2018) in 2010 in the prairies-hardwood region (strata #23). During May-June of each year, volunteers bird-watchers collect observation along ~2500 selected roadside routes spread across the north American continent. Each route consists of 50 stops, 0.8 km apart. column 1: country = contains unique country identifier column 2: state = contains unique state identifier column 3: route = contains unique route identifier column 4: year = contains information on the year in which the data were collected column 5: spp = contains unique species identifier (4940: Bobolink; 7040: Gray Catbird) following columns: stop1-stop50 = data for each of the 50 stops within a route B. CT_Fall2016_data_Covariates by site.csv = data set containing information on sampling strategy applied to each sites via camera trapping. 80 out of the 100 randomly selected sites were randomly assigned to one of two lure treatments: salmon oil and fatty acid scented oil (FAS). The remaining 20 sites were located along secondary roads (e.g. forest or logging roads). column 1: Site = contains unique site identifier column 2: Lure = contains information on the sampling strategy applied to each site: salmon oil (=1), FAS (=0), and on-trail cameras (=Trail). C. DetHist_GreyFox_Hour_Fall2016.csv = data set containing detection histories data at 1-hour resolution on grey fox (Urocyon cinereoargenteus) collected between September 1st-October 31, 2016 by Minnesota Department of Natural Resources deploying camera traps at 100 locations in northern Minnesota, USA. Only data on the 31 sites with at least a detection were used in the analysis (sites with no detection do not have information on temporal correlation). Detections and non-detection events are reported as 1s and 0s, respectively. Missing data are indicated as NAs. First column contains unique identifier for each site; following columns (labelled "oX") contain detection/nondetection data for each sampling occasion. D. DetHist_GreyFox_minute_Fall2016.csv = same as B, but data are at 1-minute resolution. E. Fall2016_record_table_0min_deltaT_2018-11-28.csv = data set containing records of detections of grey fox (Urocyon cinereoargenteus) collected between September 1st-October 31, 2016 by Minnesota Department of Natural Resources deploying camera traps at 100 locations in northern Minnesota, USA. column 1: Station = unique site identifier column 2: Species = common name of the species column 3: DateTimeOriginal = date and time when the species was detected (format: %m/%d/%Y %H:%M) column 4: Date = date in which the species was detected (format: %m/%d/%Y) column 5: Time = time in which the species was detected (format: %H:%M:%S) F. GreyFox_glmmTMB_30min.rda = R object containing saved output of Generalized Linear Mixed model ran including data from all the camera trap sites with at least a detection of grey fox, with data aggregated in 30-minute intervals. The model was obtained using the function glmmTMB in the package glmmTMB (Brooks et al. 2017) and is described in the section 3.2.3 in Iannarilli et al (2019).The R script 'Fig6_Model.R' contains code for generating the file; its output is reported in htmls/Fig6_Model.txt. This code is computationally intense to run. We used computational resources at the Minnesota Supercomputing Institute (MSI, http://www.msi.umn.edu) at the University of Minnesota and decided to provide saved version of the output to support our results. Users can load the output in the R global environment using the function load (i.e. load("output/GreyFox_glmmTMB_30min.rda") and then visualize it using the function summary (i.e. summary(mod.TMB)) after installing and loading the glmmTMB library (i.e install.packages("glmmTMB"); library(glmmTMB)). 2. The subfolder 'figures' contains all figures included in Iannarilli et al. (2019; manuscript and related appendices). The figures were created running the code reported in the R scripts files contained in the main folder. Each figure is in a .jpg format and labelled based on its reference in the manuscript (e.g. 'Iannarilli_et_al_fig1.jpg' is the Figure 1 in the manuscript). 3. The subfolder 'htmls' contains the outputs (including plots stored in the associated folder 'figures') associated with the R scripts included in the main folder. For a description of the content of each file, please refer to the description of the associated R script labelled using a similar name. 4. Fig2_simulated_examples.R = R script containing code to reproduce figure 2 in Iannarilli et al. (2019). 5. Fig3_real_data_BBS.R = R script containing code to reproduce figure 3 in Iannarilli et al. (2019). 6. Fig4_real_data_camera_traps_hour_interval.R = R script containing code to reproduce figure 4 in Iannarilli et al. (2019). 7. Fig5_real_data_camera_traps_minute_interval.R = R script containing code to reproduce figure 5 in Iannarilli et al. (2019). 8. Fig6_activity_patterns_compare_approaches.R = R script containing code to reproduce figure 6 in Iannarilli et al. (2019). 9. Fig6_Model.R = R script containing code to reproduce the model used to build figure 6 in Iannarilli et al. (2019). Model estimates were used for the parametric modelling approach presented in figure 6 in Iannarilli et al. (2019). This code is computational demanding. The authors ran it using resources at the University of Minnesota Supercomputing Institute (MSI) and it required about 10 minutes in a 62 gb on Mesabi HP Linux cluster. Output of this script is available as "Fig6_Model.txt" in the 'htmls' subfolder; the .rda file storing output of the model is located in the 'data_input' subfolder. 10. FigS1-1_FigS1-2_camera_traps_simulated_data_in_appendix_S1.R = R script containing code to reproduce figures S1-1 and S1-2 in Iannarilli et al. (2019), Appendix S1. 11. FigS1-3_residualCorrelation_in_Appendix_S1.R = R script containing code to reproduce figures S1-3 in Iannarilli et al. (2019), Appendix S1. 12. Iannarilli_et_al_Data_Code_and_Output.Rproj = RStudio project to facilitate the reproducibility of these results. 13. Iannarilli_et_al_lorelogram_computational_time.Rmd = RMarkdown file to accompany Iannarilli et al. (2019). The .pdf version contained in the 'html' folder can be created in R via the command rmarkdown::render("Iannarilli_et_al_lorelogram_computational_time.Rmd"). 14. Modified_function_for_detection_histories_by_hour.R = modified version of the function detectionHistory in the R package camtrapR (Niedballa et al. 2018). The original version does not allow user to extract detection histories at interval less than 1 day. We modified it to create detection histories at resolution of 1-hour. To use the function, users have to adapt lines 694, 697, 703, 713 in the code. Specifically, in line 694 they have to insert the name (or location) of the recordTable object created using the function recordTable in the camtrapR package (Niedballa et al. 2018); in line 697 users have to insert the name (or location) of the object created using the function cameraOperation in the camtrapR package (Niedballa et al. 2018; for additional information see also https://cran.r-project.org/web/packages/camtrapR/vignettes/DataExtraction.html#camera-operation). In line 703, users have to insert the name of the species of interest as reported in the recordTable object. Finally, line 713 should contain the correct time zone reference based on the location of the study area. 15. Modified_function_for_detection_histories_by_minute.R = same as 14, but modified to obtain detection histories at resolution of 1 minute. ----------------------------------------- References Brooks M. E., K. Kristensen, K. J. van Benthem, A. Magnusson, C. W. Berg, A. Nielsen, H. J. Skaug, M. Maechler and B. M. Bolker (2017). glmmTMB balances speed and flexibility among packages for zero-inflated generalized linear mixed modeling. The R Journal, 9(2), 378-400. Iannarilli F., T. W. Arnold, J. Erb, J. R. Fieberg. 2019. Using lorelograms to measure and model correlation in binary data: Applications to ecological studies. Methods in Ecology and Evolution. Accepted Author Manuscript. doi:10.1111/2041-210X.13308 Niedballa J., A. Courtiol and R. Sollmann (2018). camtrapR: Camera Trap Data Management and Preparation of Occupancy and Spatial Capture-Recapture Analyses. R package version 1.0. https://CRAN.R-project.org/package=camtrapR Pardieck, K.L., D.J. Ziolkowski Jr., M. Lutmerding and M.-A.R. Hudson. 2018. North American Breeding Bird Survey Dataset 1966 - 2017, version 2017.0. U.S. Geological Survey, Patuxent Wildlife Research Center. https://doi.org/10.5066/F76972V8 RStudio Team (2018). RStudio: Integrated Development for R. RStudio, Inc., Boston, MA URL http://www.rstudio.com/ R Core Team. (2018). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. -----------------------------------------