Hi Jeff,
I'm interested in working with a physical system (amorphous solids) that generates a statistical distribution that is expected to obey a "negative" power-law P(x)~x^0.5 over some x range (1e-6,1e0) before some non-powerlaw function truncates the distribution. The physical meaning of 'x' is the stress necessary to induce plastic failure in a region of the material -- for a stable solid we expect that no sites should be unstable (x = 0) so we expect a "negative" power-law. I want to use the maximum likelihood estimator method to automatically extract the power-law for this distribution, however, I'm having some difficulty convincing the powerlaw package to fit to a powerlaw that it considers "negative".
I've illustrated a few of the problems I'm having in an attached python file. The first is that x-min / x-max are behaving very strangely when generating simulated data with your package -- namely that xmin seems to behave as the upper cut-off rather than the lower cut-off, while x-max seems to behave as a lower-cutoff for that data.
The real problem comes when I try to this distribution. Fitting a sample of 10000 data points generated by your package yields alpha > 1 in all cases. If you pass the parameter_range property, restricting alpha to be between, say, -0.8 and -0.1 and do not pass xmin or xmax it causes the computation to respond with a RuntimeWwarning: "invalid value encountered in double_scalars".
If you pass a restricted parameter range and DO pass an xmin and xmax, you instead receive an error "Power_Law" object has no attribute 'parent_Fit'.
Do you have any suggestions for how to fit this distribution correctly? Ideally, I'd also like to compare to a Weibull distribution (with an exponent of 1.5 say), however, to do that you first need to successfully create a Fit object, which I am currently unable to do.
Cheers,
Daniel