custom header test
size_gamma(speciesData = rnorm(50, mean = 100, sd = 1))
Function to generate a random distribution of body sizes by drawing from a gamma distribution. Shape and rate parameters of the gamma are estimated from the empirical data.
The shape and rate parameters are estimated from the real data using the maximum likelihood estimators generated from the fitdr function in the MASS library. The flexible gamma distribution can be fit to a variety of normal, log-normal, and exponential distributions that are typical for trait data measured on a continuous non-negative scale.
obsOverlap <- size_gamma(speciesData=rnorm(50,mean=100,sd=1))
fitdistr
in the MASS library.