Skip to content

The ks_test results obtained from the module are different from the results while using the ks_test myself #85

Description

@Summer0328

Hi,

I use f.summary() to print the ks_statistic and ks_pvalue. However, the ks_pvalue for a good fit (visually) is lower than 0.05. I then calculate the ks_pvalue using the paras obtained from the f_fitted_param to do the ks_test myself and find a high p_value. Could you explain the ks_test you applied? Why is there a significant difference?

Attached is my way to calculate the p_value.
a = f.fitted_param['invgamma'][0]
loc = f.fitted_param['invgamma'][1]
scale = f.fitted_param['invgamma'][2]
x = np.linspace(invgamma.ppf(0.001, a,loc,scale),
invgamma.ppf(0.999, a,loc,scale), 10000)
ks_value = stats.kstest(data, x)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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