csgillespie / poweRlaw

This package implements both the discrete and continuous maximum likelihood estimators for fitting the power-law distribution to data. Additionally, a goodness-of-fit based approach is used to estimate the lower cutoff for the scaling region.
108 stars 24 forks source link

Right truncation? #101

Open hrlai opened 2 years ago

hrlai commented 2 years ago

Hi @csgillespie thanks first of all for this awesome package!

Related to #17 and maybe #63 , is it possible to have an option to right-truncate the data, say by having a setXmax method for each distribution? This will be extremely helpful for us to fit different distributions to the univariate data before and after a certain threshold / cutoff point.

hrlai commented 2 years ago

To provide a reference, the truncation I meant is the upper limit for a truncated Pareto (within closed intervals) as described in Table 1 of this paper:

White, E. P., Enquist, B. J., & Green, J. L. (2008). On estimating the exponent of power-law frequency distributions. Ecology, 89(10), 2971.

The upper limit threshold would be their b parameter.