2
$\begingroup$

The R package igraph has the fit_power_law function which, as you can imagine, can fit a power-law to a vector. As you can see in the reproducible example below, one of the outputs of this function is the Log-likelihood logLik of the fitted parameters.

question: is there a rule-of-thumb or a cut-off value that tells when the logLik indicates a good/bad fit? The documentation of the package is really poor in explaining how this parameter should be considered/interpreted

Reproducible example:

library(igraph)

# create a graph
  set.seed(202)
  g <- static.power.law.game(500, 1000, exponent.out= 2.2, exponent.in = -1, loops = FALSE, multiple = TRUE, finite.size.correction = TRUE)

# get the degree distribution like this:
  d <- degree_distribution(g, mode ="all", cumulative = T)
  d <- d[ d > 0] # remove unconnected nodes


# Fit power-law
  fit <- fit_power_law(d, implementation = "R.mle")
  fit

#> $continuous
#> [1] TRUE
#> 
#> $alpha
#> [1] 1.5419026
#> 
#> $xmin
#> [1] 0.028
#> 
#> $logLik
#> [1] 4.558483753
#> 
#> $KS.stat
#> [1] 0.1323368292
#> 
#> $KS.p
#> [1] 0.927129327
$\endgroup$
  • $\begingroup$ Attention: in the call to fit_power_law(), the OP used a wrong impelementation argument with a misplaced e: fit_power_law(d, impelementation = "R.mle"). --- If written without typo, the output of fit_power_law(d, implementation = "R.mle") is different: Coefficients: alpha 0.7475 $\endgroup$ – knb Apr 8 '18 at 12:36
1
$\begingroup$

The likelihood will tell you something about this fit, but the actual value of it depends on the underlying model and the data, and cannot be used to compare different models.

p-values should be used with care, but, for your question, you could look at the statistic that also also computed:

from the manual:

KS.p Numeric scalar, the p-value of the Kolmogorov-Smirnov test. Small p-values (less than 0.05) indicate that the test rejected the hypothesis that the original data could have been drawn from the fitted power-law distribution.

You should consider what null hypothesis is used in this implementation, I think the uniform discrete distribution makes sense, but it isn't mentioned anywhere.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.