I want to know the goodness of fit while fitting a power law distribution in R using poweRlaw
package.
After estimate_xmin()
, I had a p-value 0.04614726. But the bootstrap_p()
returns another p-value 0.
So why do these two p-value differ? And how can I judge if it is a power law distribution?
here is the plot when using poweRlaw for fittingpoweRlaw fitting result
Asked
Active
Viewed 503 times
1

Burry Xie
- 85
- 9
-
`estimate_xmin` doesn't return a p-value – csgillespie Dec 03 '15 at 14:46
-
then can you explain what is '$KS' value in the 'estimate_xmin' results? – Burry Xie Dec 04 '15 at 11:17
-
See `?estimate_xmin`. It's the Kolmogorov-Smirnoff statistic (as described in Clauset, Shalizi, Newman (2009)) – csgillespie Dec 04 '15 at 11:37
-
That's to say, the p-value in bootstrap_p() is the only way to see if it is a power fit? – Burry Xie Dec 04 '15 at 12:01
-
The KS statistics helps you choose the best value of `xmin`. However, your model might still be wrong. We use bootstrapping to assess model fit. – csgillespie Dec 04 '15 at 13:20
-
got it! many many thanks!! – Burry Xie Dec 04 '15 at 13:31
-
btw can I use the general ks test to assess the power fit? – Burry Xie Dec 04 '15 at 13:32
-
No not really. I've added an answer summarising this discussion. – csgillespie Dec 04 '15 at 13:55
1 Answers
0
You're getting a bit confused. One of the statistics that estimate_xmin
returns is the Kolmogorov-Smirnoff statistic (as described in Clauset, Shalizi, Newman (2009)). This statistic is used to estimate the best cut-off value for your model, i.e. xmin
. However, this doesn't tell you anything about the model fit.
To assess model suitability is where the bootstrap function comes in.

csgillespie
- 59,189
- 14
- 150
- 185
-
I see. But I have one more question: Can I use the general **ks test** to assess the model suitability instead of `bootstrap_p`? – Burry Xie Dec 04 '15 at 14:06