Skip to content

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

@dddyx

Description

@dddyx

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions