Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to calculate the R value properly for discrete data #94

Open
dddyx opened this issue Jan 9, 2022 · 0 comments
Open

how to calculate the R value properly for discrete data #94

dddyx opened this issue Jan 9, 2022 · 0 comments

Comments

@dddyx
Copy link

dddyx commented Jan 9, 2022

Hi Jeff,
Thanks for your great work !
I'm in trouble calculating the R-value for discrete data.
My code is:

import  powerlaw
theoretical_distribution=powerlaw.Power_Law(xmin=2,parameters=[10],discrete=True) 
simulated_data=theoretical_distribution.generate_random(10000)
fit = powerlaw.Fit(simulated_data,discrete=True)

R, p = fit.distribution_compare('power_law', 'exponential', normalized_ratio=True) 

the results are:

R= -1.1743540614477388
p= 0.24025323758420514

Does this mean that the distribution of the data tends to be more exponential? Or is there something wrong with my understanding
Thanks again for the tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant