You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if significance_testing:
p = np.zeros(len(self.t[self.t > 0]))
# only test on timepoints after stimulus onset
for i, t in enumerate(np.arange(len(self.t))[self.t > 0]):
# one-sided paired ttest
_, p[i] = sista.ttest_rel(
a=acc[t], b=acc_shuff[t], alternative='greater')
# Use Benjamini-Hochberg procedure for multiple comparisons, defaults to FDR of .05
_, corrected_p, _, _ = multipletests(p, method='fdr_bh')
sig05 = corrected_p < .05
I think this should be pulled out into its own function that allows for specifying alternatives and correction methods.
I also want to note that scipy lets you test along an axis, and the following should work:
p = sista.ttest_rel(a=acc, b=acc_shuff, axis=0, alternative='greater').pvalue
The text was updated successfully, but these errors were encountered:
I think this should be pulled out into its own function that allows for specifying alternatives and correction methods.
I also want to note that scipy lets you test along an axis, and the following should work:
The text was updated successfully, but these errors were encountered: