poweRlaw icon indicating copy to clipboard operation
poweRlaw copied to clipboard

Support for new/custom distributions?

Open russellcthomas opened this issue 11 years ago • 5 comments

I wonder if it would be possible to add functionality for new or custom distributions. For example, I'd like to fit and test power law with exponential cutoff (like the Python package does), but also others, like Stretched Exponential, Weibull, Generalized Exponential, and even Lognormal with Exponential cutoff.

Maybe this is already possible. If so, a tutorial would be very helpful.

russellcthomas avatar Feb 13 '14 19:02 russellcthomas

This is a great idea and is something that I intend to do. I'll try and write a vignette about it in the near future.

csgillespie avatar Feb 17 '14 11:02 csgillespie

Hi, is there anyway I can plot weibull distrbution (similar to the way we plot powerlaw and lognormal) using rpowerlaw package or any other package? I cannot figure out how plot(m) works (to be able to edit it for weibull manually), where m is a reference object created using one of the distribution function.

NemiV avatar Nov 19 '15 16:11 NemiV

Unfortunately, you'll need to create a reference class implementation of the weibull distribution. I'll create an issue and will hopefully get round to it soon

csgillespie avatar Nov 30 '15 14:11 csgillespie

Unfortunately, you'll need to create a reference class implementation of the weibull distribution. I'll create an issue and will hopefully get round to it soon

Hi Gillespie,

May I know if there is already function for Weibull (stretched exponential) distribution and discrete power law with exponential cut-off added to package?

Many thanks!

BR, Mengyun

smy310 avatar Jul 10 '20 19:07 smy310

Hi all, related also to #63, I think we already have a function for Weibull conweibull, which is not yet documented in the helpfile, but you can just use it as any other con* distributions. It seems that you can specify xmin for conweibull, but I am not 100% sure if this will give us a truncated Weibull. It'd be great if this is actually what we get.

I tried to manually cutoff my data using a threshold, then fit power to x < threshold, and a Weibull tail to x > threshold, but the parameters are not corrected to join the "broken stick" distribution at the threshold... so any help with this would be greatly appreciated :)

hrlai avatar May 12 '22 01:05 hrlai