Power Law Fit of cut-off distribution with the poweRlaw package

Viewed 1782

I am currently trying to find a way to calculate a power-law fit for a cut-off distribution with MLE. The distribution looks as follows:

Image1

As you can see, I was able to fit the whole distribution (Power-law fit) and also the lower bound (exp-fit) separately. What I am failing to figure out, is how to fit the upper bound of the distribution (f.e. 8 < x < 100).

Is there any way to do this with the poweRlaw package or any other R package? What I am hoping for is something looking like this (note: it is just a random distribution):

Image2

Code (if necessary):

#Power-Law
library("poweRlaw")
xmin1 <- 8
xmin2 <- 100
plf0 <- displ$new(deg)
plf0$setXmin(xmin1)
plf0_pars <- estimate_pars(plf0)
plf0$setPars(plf0_pars)

#Exponential
exp1 <- disexp$new(deg)
exp1$setXmin(xmin2)
exp1_pars <- estimate_pars(exp1)
exp1$setPars(exp1_pars)
plot(plf0)
lines(plf0, col="green")
lines(exp1, col="red")
3 Answers

Did you try using the R source code on Aaron Clauset's page? I mean the one by Cosma Shalizi, in section Calculating likelihood-ratio test results. It handles power laws with exponential cutoffs, according to the documentation.

Related