-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels