2 research outputs found
Appendix A. Threshold fitting rates for each method by sample size, slope of change, and environmental distribution.
Threshold fitting rates for each method by sample size, slope of change, and environmental distribution
Supplement 1. R Scripting Language code used for data generation in simulations.
<h2>File List</h2><p>
<a href="datgen_defs.R">datgen_defs.R</a><br>
<a href="datgen_script.R">datgen_script.R</a><br>
<a href="wedge.R">wedge.R</a><br>
<a href="datgen.zip">datgen.zip</a>
</p><h2>Description</h2><p>
datgen_defs.r: This file contains the following functions:
</p>
<div>
<ol>
<li>xgen() Generates random environmental values given a distribution ID and sample size.</li>
<li>mugen() Generates mean values for a negative binomial distribution over a given environmental gradient.</li>
<li>ygen() Generates random count data given an environmental gradient, distribution mean, and CV.</li>
</ol>
</div>
<p>datgen_script.r: This file generates random datasets as they were in this study.</p>
<p>wedge.r: This file contains the following functions:</p>
<div>
<ol>
<li>rwedge() Takes random draws from a wedge-shaped pdf.</li>
<li>dwedge() Reports the cdf from a wedge-shaped distribution given a quantile.</li>
</ol>
</div>
<p>datgen.zip: This zip file contains all the above files.</p