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

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

Open
Summer0328 opened this issue Aug 21, 2023 · 0 comments

Comments

@Summer0328
Copy link

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)

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