Skip to content

Why must x have more than one element in remove_na? #287

Answered by raphaelvallat
abarozet asked this question in Q&A
Discussion options

You must be logged in to vote

@abarozet unless you are doing a one-sample T-test (which is not supported by pingouin.pairwise_ttests), you must have at least two valid elements in each of your group otherwise the T value and p-value cannot be calculated.

Example using SciPy:

from scipy.stats import ttest_ind
ttest_ind([1], [2, 3, 4])  # Will return NaN and print a RuntimeWarning
ttest_ind([2, 3, 4], 1)  # Same
ttest_ind(1, 1)  # Same

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by raphaelvallat
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants