Description Usage Arguments Details Value References See Also Examples
When fitting a power-law to a discrete distribution, it might be worth discarding points below a certain threshold (xmin) to improve the fit. This function estimates the optimal xmin based on the Kolmogorov-Smirnoff distance between the fit and the empirical distribution, as suggested by Clauset et al. (2009).
1 | xmin_estim(dat, bounds = range(dat))
|
dat |
A vector of integer values |
bounds |
A bounds |
The function returns NA if dat
has only three unique values
or if the power-law fit failed.
The estimated xmin as an integer value
Clauset, A., Shalizi, C. R., & Newman, M. E. (2009). Power-law distributions in empirical data. SIAM review, 51(4), 661-703.
patchdistr_spews
, patchsizes
,
indicator_psdtype
1 2 3 4 5 | ## Not run:
psd <- patchsizes(forestgap[[5]])
xmin_estim(psd)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.