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

adding 1 to each cell? #1

Open
stikpet opened this issue Jul 2, 2024 · 0 comments
Open

adding 1 to each cell? #1

stikpet opened this issue Jul 2, 2024 · 0 comments

Comments

@stikpet
Copy link

stikpet commented Jul 2, 2024

Thanks for this package. I noticed however, when I was checking the Goodman-Kruskal Lambda and some others the results were slightly different as when I would calculate them 'by hand'. I did some digging and it seems you add a +1 to each cell count in the contingency table. I think the line of code doing this is:

Creating the table

table = [[df.query(f'a=="{x}" and b=="{y}"').shape[0] + 1 for y in b_values] for x in a_values]

Is there a reason why this +1 always gets added, and should it?

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