Jonathan P. Daily, Nathaniel P. Hitt, David R. Smith, and Craig D. Snyder. 2012. Experimental and environmental factors affect spurious detection of ecological thresholds. Ecology 93:17–23.


Supplement

R Scripting Language code used for data generation in simulations.
Ecological Archives E093-003-S1.

Copyright


Authors
File list (downloads)
Description


Author(s)

Jonathan P. Daily
Leetown Science Center - USGS
11649 Leetown Road
Kearneysville, WV, 25430
USA
E-mail: jdaily@usgs.gov

Nathaniel P. Hitt
Leetown Science Center - USGS
11649 Leetown Road
Kearneysville, WV, 25430
USA

David R. Smith
Leetown Science Center - USGS
11649 Leetown Road
Kearneysville, WV, 25430
USA

Craig D. Snyder
Leetown Science Center - USGS
11649 Leetown Road
Kearneysville, WV, 25430
USA


File list

datgen_defs.R
datgen_script.R
wedge.R
datgen.zip

Description

datgen_defs.r: This file contains the following functions:

  1. xgen() Generates random environmental values given a distribution ID and sample size.
  2. mugen() Generates mean values for a negative binomial distribution over a given environmental gradient.
  3. ygen() Generates random count data given an environmental gradient, distribution mean, and CV.

datgen_script.r: This file generates random datasets as they were in this study.

wedge.r: This file contains the following functions:

  1. rwedge() Takes random draws from a wedge-shaped pdf.
  2. dwedge() Reports the cdf from a wedge-shaped distribution given a quantile.

datgen.zip: This zip file contains all the above files.