Supplement 1. R code for simulating treatment effects on local survival and models fitted with the R package unmarked.

File List

BACIocc.r (md5: 77df2f2d3edc106acaaaa8d8e55c4ee9)
dynamicOcc.r (md5: f3da3d532685597b12a8469ae9bb1ade)


BACIocc.r and dynamicOcc.r contain R code used to simulate treatment effects on local survival, and models fitted with the R package unmarked 0.9-2 (Fiske and Chandler 2011). BACIocc.r contains code for simulating occupancy data (detection/non-detection) using a Before-After Control-Impact framework, and dynamicOcc.r contains code for dynamic occupancy model fitting. dynamicOcc.r cannot be run independently, but only in conjunction with BACIocc.r, where all variables are declared initialized. Variable definitions and other detailed explanations are embedded in the R code.