Wiley
Browse
1/1
5 files

Supplement 1. R Scripting Language code used for data generation in simulations.

dataset
posted on 2016-08-09, 11:19 authored by Jonathan P. Daily, Nathaniel P. Hitt, David R. Smith, Craig D. Snyder

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.

History