from statsmodels.stats.multitest import fdrcorrection rejected, q-value = fdrcorrection(my_list_of_p_values)
Here is what the above code is Doing:
1. It’s creating a list of p-values, which we’ll call my_list_of_p_values.
2. It’s running the fdrcorrection function on my_list_of_p_values.
3. It’s storing the results of the fdrcorrection function in two variables: rejected and q-value.
The rejected variable is a list of booleans. If the value at index i in rejected is True, that means that the p-value at index i in my_list_of_p_values has been rejected.
The q-value variable is a list of p-values. If the value at index i in q-value is less than 0.05, that means that the p-value at index i in my_list_of_p_values has been rejected.
You can use either the rejected variable or the q-value variable to find out which p-values have been rejected.
1. Create a list of p-values.
2. Use the fdrcorrection function to find out which p-values have been rejected.
3. Print the rejected variable.