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

Custom degrees of freedom argument for the PowerDivergenceTest #266

Open
BERENZ opened this issue Mar 18, 2022 · 4 comments · May be fixed by #288
Open

Custom degrees of freedom argument for the PowerDivergenceTest #266

BERENZ opened this issue Mar 18, 2022 · 4 comments · May be fixed by #288

Comments

@BERENZ
Copy link

BERENZ commented Mar 18, 2022

Is it possible to add a custom parameter for the degrees of freedom in the PowerDivergenceTest function which will be an adjustment to the df for the p-value? This may be useful for the goodness of fit tests ($G^2, \chi^2$) as the current implementation does not account for the number of parameres of the reference distribution. I think that implementation proposed in scipy.stats.power_divergence seems be the right way to do so (ddof parameter). Now, the user needs to remember to correct p-value after the test.

@nalimilan
Copy link
Member

Makes sense. Could you provide other references about this adjustment? Would you be willing to make a pull request?

@BERENZ
Copy link
Author

BERENZ commented Mar 22, 2022

Sure, I will make a pull request to the end of this week.

@kunzaatko
Copy link

Hello @BERENZ. May I ask about the state of this issue? It looks like you already have a commit in your fork for this. It there something else missing that needs to be done before the upstreaming? I can help with something if necessary.

@sprague252
Copy link

I am also interested in this functionality. I imagine it would work like the ddof parameter in scipy.stats.chisquare. See the documentation at https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.chisquare.html. In that function the ddof parameter gives the decrease in degrees of freedom from the default value. Of course, another possibility would be to add a dof parameter for the user to supply the number of degrees of freedom directly.

What can I do to help make this happen?

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