Note
Go to the end to download the full example code.
Permutation statistics
Eelbrain implents three methods for estimating null-distributions in permutation tests: max-statistic, cluster-mass and TFCE. This example illustrates these using a simple t-test. For simulating more complex datasets see other examples in this section.
For the sake of speed, the tests here are based on 1000 permutations of the data (samples=1000
).
For precise p-values, 10000 permutations (the default) are preferable.
Max statistic
The max statistic is simply the maximum across the entire t-map.
The permutation distribution consist of max(t)
for each permutation.
This is the default, and is also the fastest test.
result = testnd.TTestOneSample(eeg, samples=1000)
Permutation test: 0%| | 0/1000 [00:00<?, ? permutations/s]
Permutation test: 4%|▎ | 35/1000 [00:00<00:02, 347.09 permutations/s]
Permutation test: 8%|▊ | 80/1000 [00:00<00:02, 406.35 permutations/s]
Permutation test: 12%|█▏ | 124/1000 [00:00<00:02, 420.84 permutations/s]
Permutation test: 17%|█▋ | 169/1000 [00:00<00:01, 429.29 permutations/s]
Permutation test: 21%|██▏ | 214/1000 [00:00<00:01, 435.09 permutations/s]
Permutation test: 26%|██▌ | 259/1000 [00:00<00:01, 438.65 permutations/s]
Permutation test: 30%|███ | 305/1000 [00:00<00:01, 442.13 permutations/s]
Permutation test: 35%|███▌ | 350/1000 [00:00<00:01, 442.67 permutations/s]
Permutation test: 40%|███▉ | 395/1000 [00:00<00:01, 443.37 permutations/s]
Permutation test: 44%|████▍ | 440/1000 [00:01<00:01, 445.28 permutations/s]
Permutation test: 49%|████▊ | 486/1000 [00:01<00:01, 446.01 permutations/s]
Permutation test: 53%|█████▎ | 531/1000 [00:01<00:01, 445.60 permutations/s]
Permutation test: 58%|█████▊ | 577/1000 [00:01<00:00, 445.08 permutations/s]
Permutation test: 62%|██████▏ | 622/1000 [00:01<00:00, 444.34 permutations/s]
Permutation test: 67%|██████▋ | 667/1000 [00:01<00:00, 440.28 permutations/s]
Permutation test: 71%|███████ | 712/1000 [00:01<00:00, 441.30 permutations/s]
Permutation test: 76%|███████▌ | 757/1000 [00:01<00:00, 443.04 permutations/s]
Permutation test: 80%|████████ | 802/1000 [00:01<00:00, 442.82 permutations/s]
Permutation test: 85%|████████▍ | 848/1000 [00:01<00:00, 446.31 permutations/s]
Permutation test: 89%|████████▉ | 894/1000 [00:02<00:00, 446.28 permutations/s]
Permutation test: 94%|█████████▍| 940/1000 [00:02<00:00, 448.28 permutations/s]
Permutation test: 98%|█████████▊| 985/1000 [00:02<00:00, 447.66 permutations/s]
Permutation test: 100%|██████████| 1000/1000 [00:02<00:00, 441.01 permutations/s]
Visualize the permutation distribution. We consider values significant if they are larger than 95% of the permutation distribution, so we look for the 95th percentile:
significance_threshold = scipy.stats.scoreatpercentile(result.permutation_distribution, 95)
p = plot.Histogram(
result.permutation_distribution, title='Distribution of $max(t)$',
xlabel='max(t)', ylabel='Number of permutations')
p.add_vline(significance_threshold, color='red', linestyle='--')
_ = p.axes[0].text(significance_threshold, 40, ' 95%', color='red')
In the actual comparison, any data point with a t-value that is more extreme than 95% of the permutation distribution is considered signifiacant:
p = plot.TopoButterfly(result, t=0.13, head_radius=0.35)
Significant regions can be retrieved as Dataset
of NDVar
for further analysis (e.g., for defining ROIs).
This function will find all contiguous regions in which p ≤ .05:
significan_regions = result.find_clusters(0.05, maps=True)
significan_regions
p = plot.TopoButterfly(significan_regions[0, 'cluster'], t=0.13, head_radius=0.35)
Cluster-based tests
In cluster-based tests, a first steps consists in finding contiguous regions of “meaningful” effect, so-called clusters. In order to find contiguous regions, the algorithm needs to know which channels are neighbors. This information is refered to as the sensor connectivity (i.e., which sensors are connected). The connectivity graph can be visualized to confirm that it is set correctly.
p = plot.SensorMap(eeg, connectivity=True)
We also need to define what constitutes a “meaningful” effect, i.e., an effect that should be included in the cluster.
This can be defined based on the magnitude of the statistic (e.g., a t-value).
It is commonly set to a t value equivalent to an uncorrected p-vale of .05.
This is specified with the pmin=.05
argument.
A summary statistic is then computed for each cluster. In Eelbrain this is the cluster-mass statistic: the sum of all values in the cluster (i.e., the sum of the t values at all datapoints that are part of the cluster). The clustering procedure is repeated in each permutation, and the largest cluster-mass value is retained, to derive a permutation distribution for cluster-mass values expected under the null hypothesis. Each cluster in the actual data can then be evaluated against this distribution.
result = testnd.TTestOneSample(eeg, samples=1000, pmin=.05)
p = plot.TopoButterfly(result, t=0.13, head_radius=0.35)
Permutation test: 0%| | 0/1000 [00:00<?, ? permutations/s]
Permutation test: 3%|▎ | 34/1000 [00:00<00:02, 331.00 permutations/s]
Permutation test: 7%|▋ | 73/1000 [00:00<00:02, 359.64 permutations/s]
Permutation test: 11%|█ | 111/1000 [00:00<00:02, 367.92 permutations/s]
Permutation test: 15%|█▌ | 150/1000 [00:00<00:02, 375.31 permutations/s]
Permutation test: 19%|█▉ | 188/1000 [00:00<00:02, 376.44 permutations/s]
Permutation test: 23%|██▎ | 227/1000 [00:00<00:02, 378.34 permutations/s]
Permutation test: 27%|██▋ | 266/1000 [00:00<00:01, 379.81 permutations/s]
Permutation test: 30%|███ | 305/1000 [00:00<00:01, 379.55 permutations/s]
Permutation test: 34%|███▍ | 344/1000 [00:00<00:01, 380.13 permutations/s]
Permutation test: 38%|███▊ | 383/1000 [00:01<00:01, 381.11 permutations/s]
Permutation test: 42%|████▏ | 422/1000 [00:01<00:01, 381.53 permutations/s]
Permutation test: 46%|████▌ | 461/1000 [00:01<00:01, 382.69 permutations/s]
Permutation test: 50%|█████ | 500/1000 [00:01<00:01, 384.77 permutations/s]
Permutation test: 54%|█████▍ | 540/1000 [00:01<00:01, 383.53 permutations/s]
Permutation test: 58%|█████▊ | 579/1000 [00:01<00:01, 383.50 permutations/s]
Permutation test: 62%|██████▏ | 619/1000 [00:01<00:00, 384.69 permutations/s]
Permutation test: 66%|██████▌ | 658/1000 [00:01<00:00, 384.36 permutations/s]
Permutation test: 70%|██████▉ | 697/1000 [00:01<00:00, 384.11 permutations/s]
Permutation test: 74%|███████▎ | 736/1000 [00:01<00:00, 383.69 permutations/s]
Permutation test: 78%|███████▊ | 775/1000 [00:02<00:00, 381.95 permutations/s]
Permutation test: 82%|████████▏ | 815/1000 [00:02<00:00, 383.99 permutations/s]
Permutation test: 85%|████████▌ | 854/1000 [00:02<00:00, 384.97 permutations/s]
Permutation test: 89%|████████▉ | 894/1000 [00:02<00:00, 384.72 permutations/s]
Permutation test: 93%|█████████▎| 933/1000 [00:02<00:00, 383.61 permutations/s]
Permutation test: 97%|█████████▋| 973/1000 [00:02<00:00, 385.95 permutations/s]
Permutation test: 100%|██████████| 1000/1000 [00:02<00:00, 381.80 permutations/s]
Compared to the max(t)
approach above:
Clusters tend to be larger, because an uncorrected p = .05 (the cluster forming threshold) usually corresponds to a lower t-value than a corrected p = .05.
A second, later cluster emerged, showing that this test can be more powerful when effects are temporally and spatially extended.
Because clusters are formed before computing the permutation distribution, there are usually many non-significant clusters (we don not want to list them all here):
result.find_clusters().head()
List only significant clusters
result.find_clusters(pmin=0.05)
Threshold-free cluster enhancement (TFCE)
TFCE is an image processing algorithm that enhances cluster-like features, but without setting an arbitrary threshold. It thus combines the advantage the max statistic approach (not having to set an arbitrary threshold) with the advantage of the cluster-based test of increased sensitivity for effects that are extended in space and time.
result = testnd.TTestOneSample(eeg, samples=1000, tfce=True)
p = plot.TopoButterfly(result, t=0.13, head_radius=0.35)
Permutation test: 0%| | 0/1000 [00:00<?, ? permutations/s]
Permutation test: 0%| | 5/1000 [00:00<00:21, 45.34 permutations/s]
Permutation test: 1%| | 11/1000 [00:00<00:18, 52.81 permutations/s]
Permutation test: 2%|▏ | 17/1000 [00:00<00:17, 55.62 permutations/s]
Permutation test: 2%|▏ | 24/1000 [00:00<00:16, 57.70 permutations/s]
Permutation test: 3%|▎ | 30/1000 [00:00<00:16, 58.35 permutations/s]
Permutation test: 4%|▎ | 36/1000 [00:00<00:16, 58.40 permutations/s]
Permutation test: 4%|▍ | 42/1000 [00:00<00:16, 57.49 permutations/s]
Permutation test: 5%|▍ | 48/1000 [00:00<00:16, 57.00 permutations/s]
Permutation test: 5%|▌ | 54/1000 [00:00<00:16, 57.47 permutations/s]
Permutation test: 6%|▌ | 60/1000 [00:01<00:16, 57.85 permutations/s]
Permutation test: 7%|▋ | 66/1000 [00:01<00:16, 57.12 permutations/s]
Permutation test: 7%|▋ | 72/1000 [00:01<00:16, 57.93 permutations/s]
Permutation test: 8%|▊ | 78/1000 [00:01<00:15, 58.17 permutations/s]
Permutation test: 8%|▊ | 84/1000 [00:01<00:15, 58.09 permutations/s]
Permutation test: 9%|▉ | 90/1000 [00:01<00:15, 57.22 permutations/s]
Permutation test: 10%|▉ | 96/1000 [00:01<00:15, 57.19 permutations/s]
Permutation test: 10%|█ | 102/1000 [00:01<00:15, 57.12 permutations/s]
Permutation test: 11%|█ | 108/1000 [00:01<00:15, 57.45 permutations/s]
Permutation test: 11%|█▏ | 114/1000 [00:01<00:15, 57.25 permutations/s]
Permutation test: 12%|█▏ | 120/1000 [00:02<00:15, 57.74 permutations/s]
Permutation test: 13%|█▎ | 126/1000 [00:02<00:15, 57.24 permutations/s]
Permutation test: 13%|█▎ | 132/1000 [00:02<00:15, 57.56 permutations/s]
Permutation test: 14%|█▍ | 138/1000 [00:02<00:14, 57.65 permutations/s]
Permutation test: 14%|█▍ | 145/1000 [00:02<00:15, 55.82 permutations/s]
Permutation test: 15%|█▌ | 151/1000 [00:02<00:14, 56.76 permutations/s]
Permutation test: 16%|█▌ | 157/1000 [00:02<00:14, 57.20 permutations/s]
Permutation test: 16%|█▋ | 163/1000 [00:02<00:14, 57.66 permutations/s]
Permutation test: 17%|█▋ | 169/1000 [00:02<00:14, 58.05 permutations/s]
Permutation test: 18%|█▊ | 175/1000 [00:03<00:14, 57.94 permutations/s]
Permutation test: 18%|█▊ | 182/1000 [00:03<00:13, 59.22 permutations/s]
Permutation test: 19%|█▉ | 188/1000 [00:03<00:13, 58.67 permutations/s]
Permutation test: 19%|█▉ | 194/1000 [00:03<00:13, 58.55 permutations/s]
Permutation test: 20%|██ | 200/1000 [00:03<00:13, 58.13 permutations/s]
Permutation test: 21%|██ | 206/1000 [00:03<00:13, 57.32 permutations/s]
Permutation test: 21%|██ | 212/1000 [00:03<00:13, 57.27 permutations/s]
Permutation test: 22%|██▏ | 218/1000 [00:03<00:13, 57.50 permutations/s]
Permutation test: 22%|██▏ | 224/1000 [00:03<00:13, 57.48 permutations/s]
Permutation test: 23%|██▎ | 230/1000 [00:04<00:13, 57.16 permutations/s]
Permutation test: 24%|██▎ | 236/1000 [00:04<00:13, 56.96 permutations/s]
Permutation test: 24%|██▍ | 242/1000 [00:04<00:13, 57.01 permutations/s]
Permutation test: 25%|██▍ | 249/1000 [00:04<00:12, 60.20 permutations/s]
Permutation test: 26%|██▌ | 256/1000 [00:04<00:12, 57.65 permutations/s]
Permutation test: 26%|██▌ | 262/1000 [00:04<00:12, 58.18 permutations/s]
Permutation test: 27%|██▋ | 269/1000 [00:04<00:12, 59.87 permutations/s]
Permutation test: 28%|██▊ | 276/1000 [00:04<00:12, 58.40 permutations/s]
Permutation test: 28%|██▊ | 282/1000 [00:04<00:12, 58.19 permutations/s]
Permutation test: 29%|██▉ | 288/1000 [00:04<00:12, 58.15 permutations/s]
Permutation test: 29%|██▉ | 294/1000 [00:05<00:12, 57.94 permutations/s]
Permutation test: 30%|███ | 300/1000 [00:05<00:12, 57.92 permutations/s]
Permutation test: 31%|███ | 306/1000 [00:05<00:11, 57.97 permutations/s]
Permutation test: 31%|███▏ | 313/1000 [00:05<00:11, 59.32 permutations/s]
Permutation test: 32%|███▏ | 319/1000 [00:05<00:11, 59.11 permutations/s]
Permutation test: 32%|███▎ | 325/1000 [00:05<00:11, 58.56 permutations/s]
Permutation test: 33%|███▎ | 331/1000 [00:05<00:11, 58.43 permutations/s]
Permutation test: 34%|███▍ | 338/1000 [00:05<00:11, 58.62 permutations/s]
Permutation test: 34%|███▍ | 344/1000 [00:05<00:11, 57.97 permutations/s]
Permutation test: 35%|███▌ | 350/1000 [00:06<00:11, 58.00 permutations/s]
Permutation test: 36%|███▌ | 356/1000 [00:06<00:11, 58.53 permutations/s]
Permutation test: 36%|███▌ | 362/1000 [00:06<00:10, 58.73 permutations/s]
Permutation test: 37%|███▋ | 368/1000 [00:06<00:10, 58.99 permutations/s]
Permutation test: 37%|███▋ | 374/1000 [00:06<00:10, 59.03 permutations/s]
Permutation test: 38%|███▊ | 380/1000 [00:06<00:10, 59.12 permutations/s]
Permutation test: 39%|███▊ | 386/1000 [00:06<00:10, 58.96 permutations/s]
Permutation test: 39%|███▉ | 392/1000 [00:06<00:10, 58.65 permutations/s]
Permutation test: 40%|███▉ | 398/1000 [00:06<00:10, 58.73 permutations/s]
Permutation test: 40%|████ | 404/1000 [00:06<00:10, 58.98 permutations/s]
Permutation test: 41%|████ | 410/1000 [00:07<00:10, 58.41 permutations/s]
Permutation test: 42%|████▏ | 417/1000 [00:07<00:10, 57.77 permutations/s]
Permutation test: 42%|████▏ | 423/1000 [00:07<00:09, 58.24 permutations/s]
Permutation test: 43%|████▎ | 429/1000 [00:07<00:09, 58.02 permutations/s]
Permutation test: 44%|████▎ | 435/1000 [00:07<00:09, 58.33 permutations/s]
Permutation test: 44%|████▍ | 441/1000 [00:07<00:09, 57.65 permutations/s]
Permutation test: 45%|████▍ | 447/1000 [00:07<00:09, 57.19 permutations/s]
Permutation test: 45%|████▌ | 453/1000 [00:07<00:09, 57.52 permutations/s]
Permutation test: 46%|████▌ | 459/1000 [00:07<00:09, 57.90 permutations/s]
Permutation test: 46%|████▋ | 465/1000 [00:08<00:09, 58.37 permutations/s]
Permutation test: 47%|████▋ | 471/1000 [00:08<00:09, 58.60 permutations/s]
Permutation test: 48%|████▊ | 477/1000 [00:08<00:08, 58.43 permutations/s]
Permutation test: 48%|████▊ | 483/1000 [00:08<00:08, 58.82 permutations/s]
Permutation test: 49%|████▉ | 489/1000 [00:08<00:08, 59.07 permutations/s]
Permutation test: 50%|████▉ | 495/1000 [00:08<00:08, 59.13 permutations/s]
Permutation test: 50%|█████ | 501/1000 [00:08<00:08, 59.27 permutations/s]
Permutation test: 51%|█████ | 507/1000 [00:08<00:08, 58.68 permutations/s]
Permutation test: 51%|█████▏ | 513/1000 [00:08<00:08, 58.62 permutations/s]
Permutation test: 52%|█████▏ | 519/1000 [00:08<00:08, 58.62 permutations/s]
Permutation test: 52%|█████▎ | 525/1000 [00:09<00:08, 58.21 permutations/s]
Permutation test: 53%|█████▎ | 531/1000 [00:09<00:08, 58.62 permutations/s]
Permutation test: 54%|█████▎ | 537/1000 [00:09<00:07, 58.47 permutations/s]
Permutation test: 54%|█████▍ | 543/1000 [00:09<00:07, 58.79 permutations/s]
Permutation test: 55%|█████▍ | 549/1000 [00:09<00:07, 58.68 permutations/s]
Permutation test: 56%|█████▌ | 556/1000 [00:09<00:07, 57.84 permutations/s]
Permutation test: 56%|█████▌ | 562/1000 [00:09<00:07, 57.42 permutations/s]
Permutation test: 57%|█████▋ | 568/1000 [00:09<00:07, 57.46 permutations/s]
Permutation test: 57%|█████▊ | 575/1000 [00:09<00:07, 60.46 permutations/s]
Permutation test: 58%|█████▊ | 582/1000 [00:10<00:07, 58.87 permutations/s]
Permutation test: 59%|█████▉ | 588/1000 [00:10<00:07, 58.03 permutations/s]
Permutation test: 60%|█████▉ | 595/1000 [00:10<00:06, 59.88 permutations/s]
Permutation test: 60%|██████ | 602/1000 [00:10<00:06, 58.27 permutations/s]
Permutation test: 61%|██████ | 608/1000 [00:10<00:06, 57.31 permutations/s]
Permutation test: 61%|██████▏ | 614/1000 [00:10<00:06, 57.78 permutations/s]
Permutation test: 62%|██████▏ | 620/1000 [00:10<00:06, 57.30 permutations/s]
Permutation test: 63%|██████▎ | 626/1000 [00:10<00:06, 57.31 permutations/s]
Permutation test: 63%|██████▎ | 632/1000 [00:10<00:06, 57.50 permutations/s]
Permutation test: 64%|██████▍ | 638/1000 [00:10<00:06, 57.46 permutations/s]
Permutation test: 64%|██████▍ | 644/1000 [00:11<00:06, 57.70 permutations/s]
Permutation test: 65%|██████▌ | 650/1000 [00:11<00:06, 57.42 permutations/s]
Permutation test: 66%|██████▌ | 656/1000 [00:11<00:06, 57.24 permutations/s]
Permutation test: 66%|██████▌ | 662/1000 [00:11<00:05, 57.30 permutations/s]
Permutation test: 67%|██████▋ | 668/1000 [00:11<00:05, 58.06 permutations/s]
Permutation test: 67%|██████▋ | 674/1000 [00:11<00:05, 57.84 permutations/s]
Permutation test: 68%|██████▊ | 680/1000 [00:11<00:05, 57.95 permutations/s]
Permutation test: 69%|██████▊ | 686/1000 [00:11<00:05, 58.40 permutations/s]
Permutation test: 69%|██████▉ | 693/1000 [00:11<00:05, 59.03 permutations/s]
Permutation test: 70%|██████▉ | 699/1000 [00:12<00:05, 59.17 permutations/s]
Permutation test: 70%|███████ | 705/1000 [00:12<00:04, 59.22 permutations/s]
Permutation test: 71%|███████ | 711/1000 [00:12<00:04, 58.24 permutations/s]
Permutation test: 72%|███████▏ | 717/1000 [00:12<00:04, 58.37 permutations/s]
Permutation test: 72%|███████▏ | 723/1000 [00:12<00:04, 58.20 permutations/s]
Permutation test: 73%|███████▎ | 729/1000 [00:12<00:04, 58.10 permutations/s]
Permutation test: 74%|███████▎ | 735/1000 [00:12<00:04, 58.27 permutations/s]
Permutation test: 74%|███████▍ | 741/1000 [00:12<00:04, 57.58 permutations/s]
Permutation test: 75%|███████▍ | 747/1000 [00:12<00:04, 58.16 permutations/s]
Permutation test: 75%|███████▌ | 753/1000 [00:12<00:04, 58.17 permutations/s]
Permutation test: 76%|███████▌ | 759/1000 [00:13<00:04, 57.65 permutations/s]
Permutation test: 76%|███████▋ | 765/1000 [00:13<00:04, 57.56 permutations/s]
Permutation test: 77%|███████▋ | 771/1000 [00:13<00:03, 57.99 permutations/s]
Permutation test: 78%|███████▊ | 777/1000 [00:13<00:03, 57.57 permutations/s]
Permutation test: 78%|███████▊ | 783/1000 [00:13<00:03, 58.13 permutations/s]
Permutation test: 79%|███████▉ | 789/1000 [00:13<00:03, 58.07 permutations/s]
Permutation test: 80%|███████▉ | 795/1000 [00:13<00:03, 58.47 permutations/s]
Permutation test: 80%|████████ | 801/1000 [00:13<00:03, 58.04 permutations/s]
Permutation test: 81%|████████ | 807/1000 [00:13<00:03, 57.81 permutations/s]
Permutation test: 81%|████████▏ | 813/1000 [00:14<00:03, 57.69 permutations/s]
Permutation test: 82%|████████▏ | 819/1000 [00:14<00:03, 57.75 permutations/s]
Permutation test: 82%|████████▎ | 825/1000 [00:14<00:03, 57.42 permutations/s]
Permutation test: 83%|████████▎ | 831/1000 [00:14<00:02, 57.63 permutations/s]
Permutation test: 84%|████████▎ | 837/1000 [00:14<00:02, 57.66 permutations/s]
Permutation test: 84%|████████▍ | 843/1000 [00:14<00:02, 58.14 permutations/s]
Permutation test: 85%|████████▍ | 849/1000 [00:14<00:02, 58.34 permutations/s]
Permutation test: 86%|████████▌ | 855/1000 [00:14<00:02, 57.93 permutations/s]
Permutation test: 86%|████████▌ | 861/1000 [00:14<00:02, 58.09 permutations/s]
Permutation test: 87%|████████▋ | 867/1000 [00:14<00:02, 58.27 permutations/s]
Permutation test: 87%|████████▋ | 873/1000 [00:15<00:02, 58.75 permutations/s]
Permutation test: 88%|████████▊ | 879/1000 [00:15<00:02, 57.94 permutations/s]
Permutation test: 88%|████████▊ | 885/1000 [00:15<00:01, 58.20 permutations/s]
Permutation test: 89%|████████▉ | 891/1000 [00:15<00:01, 58.15 permutations/s]
Permutation test: 90%|████████▉ | 897/1000 [00:15<00:01, 58.00 permutations/s]
Permutation test: 90%|█████████ | 903/1000 [00:15<00:01, 58.58 permutations/s]
Permutation test: 91%|█████████ | 909/1000 [00:15<00:01, 58.83 permutations/s]
Permutation test: 92%|█████████▏| 915/1000 [00:15<00:01, 58.89 permutations/s]
Permutation test: 92%|█████████▏| 922/1000 [00:15<00:01, 59.64 permutations/s]
Permutation test: 93%|█████████▎| 929/1000 [00:15<00:01, 59.34 permutations/s]
Permutation test: 94%|█████████▎| 935/1000 [00:16<00:01, 59.25 permutations/s]
Permutation test: 94%|█████████▍| 941/1000 [00:16<00:00, 59.12 permutations/s]
Permutation test: 95%|█████████▍| 948/1000 [00:16<00:00, 60.12 permutations/s]
Permutation test: 96%|█████████▌| 955/1000 [00:16<00:00, 60.09 permutations/s]
Permutation test: 96%|█████████▌| 962/1000 [00:16<00:00, 59.35 permutations/s]
Permutation test: 97%|█████████▋| 968/1000 [00:16<00:00, 59.14 permutations/s]
Permutation test: 97%|█████████▋| 974/1000 [00:16<00:00, 59.00 permutations/s]
Permutation test: 98%|█████████▊| 980/1000 [00:16<00:00, 56.17 permutations/s]
Permutation test: 99%|█████████▊| 986/1000 [00:16<00:00, 56.26 permutations/s]
Permutation test: 99%|█████████▉| 992/1000 [00:17<00:00, 56.88 permutations/s]
Permutation test: 100%|█████████▉| 998/1000 [00:17<00:00, 57.64 permutations/s]
Permutation test: 100%|██████████| 1000/1000 [00:17<00:00, 58.11 permutations/s]
Result representation is analogous to the max statistic approach, with the addition that the TFCE map can be visualized:
p = plot.TopoButterfly(result.tfce_map, t=0.13, head_radius=0.35)
Total running time of the script: (0 minutes 25.058 seconds)