Multiple regression

Multiple regression designs apply to at least two scenarios.

  • Analyzing a single subject’s data when trials are associated with one or multiple continuous variables.

  • Analyzing group data when subjects are associated with one or multiple individual difference variables.

Here the analysis is illustrated for a simulated dataset from a single subject. Group analysis works analogously, except that each case in the datatset would represent a different subject rather than a different trial.

For such group analysis, it is necessary to reduce each subject’s data to a single case first because multiple regression assumes a fixed effects model. Such designs are described under Two-stage test.

Simulated data

# sphinx_gallery_thumbnail_number = 2
from eelbrain import *


data = datasets.simulate_erp(snr=0.5)
data.head()
# cloze predictability n_chars
0 0.026139 low 4
1 0.99529 high 5
2 0.93062 high 3
3 0.82404 high 7
4 0.17041 low 4
5 0.18508 low 4
6 0.23345 low 4
7 0.80784 high 3
8 0.24979 low 7
9 0.26753 low 4
NDVars: eeg


The data represents 80 trials from a simulated word reading paradigm, where each word is associated with a word length (n_chars) and predictability (cloze).

p = plot.Scatter('cloze', 'n_chars', data=data, h=3)
sensor lm

Plot the average of each level on n_chars to illustrate the linear increase of the response around 130 ms with n_char.

p = plot.TopoButterfly('eeg', 'n_chars', data=data, t=.130, axh=2, w=6)
sensor lm

Multiple regression

Fit a multiple regression model. Estimate $p$-values using a cluster-based permuatation test, using a cluster-forming threshold of uncorrected $p$=.05 and 10,000 permutations (the default).

lm = testnd.LM('eeg', 'n_chars + cloze', data=data, tstart=0.050, tstop=0.500, pmin=0.05)
Permutation test:   0%|          | 0/10000 [00:00<?, ? permutations/s]
Permutation test:   0%|          | 19/10000 [00:00<00:54, 184.24 permutations/s]
Permutation test:   0%|          | 41/10000 [00:00<00:49, 201.88 permutations/s]
Permutation test:   1%|          | 62/10000 [00:00<00:49, 201.88 permutations/s]
Permutation test:   1%|          | 84/10000 [00:00<00:47, 207.45 permutations/s]
Permutation test:   1%|          | 105/10000 [00:00<00:47, 206.70 permutations/s]
Permutation test:   1%|▏         | 126/10000 [00:00<00:48, 202.83 permutations/s]
Permutation test:   1%|▏         | 149/10000 [00:00<00:47, 206.70 permutations/s]
Permutation test:   2%|▏         | 170/10000 [00:00<00:48, 202.23 permutations/s]
Permutation test:   2%|▏         | 191/10000 [00:00<00:54, 180.87 permutations/s]
Permutation test:   2%|▏         | 213/10000 [00:01<00:52, 185.80 permutations/s]
Permutation test:   2%|▏         | 237/10000 [00:01<00:48, 200.49 permutations/s]
Permutation test:   3%|▎         | 261/10000 [00:01<00:46, 211.07 permutations/s]
Permutation test:   3%|▎         | 285/10000 [00:01<00:44, 218.11 permutations/s]
Permutation test:   3%|▎         | 309/10000 [00:01<00:43, 223.14 permutations/s]
Permutation test:   3%|▎         | 332/10000 [00:01<00:43, 220.25 permutations/s]
Permutation test:   4%|▎         | 355/10000 [00:01<00:46, 207.91 permutations/s]
Permutation test:   4%|▍         | 377/10000 [00:01<00:45, 210.20 permutations/s]
Permutation test:   4%|▍         | 399/10000 [00:01<00:48, 198.06 permutations/s]
Permutation test:   4%|▍         | 423/10000 [00:02<00:46, 207.13 permutations/s]
Permutation test:   4%|▍         | 444/10000 [00:02<00:46, 204.67 permutations/s]
Permutation test:   5%|▍         | 469/10000 [00:02<00:44, 213.59 permutations/s]
Permutation test:   5%|▍         | 494/10000 [00:02<00:42, 223.57 permutations/s]
Permutation test:   5%|▌         | 517/10000 [00:02<00:42, 223.34 permutations/s]
Permutation test:   5%|▌         | 540/10000 [00:02<00:44, 214.14 permutations/s]
Permutation test:   6%|▌         | 562/10000 [00:02<00:43, 215.18 permutations/s]
Permutation test:   6%|▌         | 586/10000 [00:02<00:42, 221.83 permutations/s]
Permutation test:   6%|▌         | 609/10000 [00:02<00:45, 208.00 permutations/s]
Permutation test:   6%|▋         | 631/10000 [00:03<00:45, 204.17 permutations/s]
Permutation test:   7%|▋         | 656/10000 [00:03<00:43, 215.93 permutations/s]
Permutation test:   7%|▋         | 678/10000 [00:03<00:43, 213.72 permutations/s]
Permutation test:   7%|▋         | 700/10000 [00:03<00:43, 215.25 permutations/s]
Permutation test:   7%|▋         | 722/10000 [00:03<00:43, 214.45 permutations/s]
Permutation test:   7%|▋         | 746/10000 [00:03<00:42, 219.49 permutations/s]
Permutation test:   8%|▊         | 769/10000 [00:03<00:45, 204.64 permutations/s]
Permutation test:   8%|▊         | 790/10000 [00:03<00:49, 187.25 permutations/s]
Permutation test:   8%|▊         | 810/10000 [00:03<00:51, 177.35 permutations/s]
Permutation test:   8%|▊         | 829/10000 [00:04<00:56, 161.45 permutations/s]
Permutation test:   8%|▊         | 847/10000 [00:04<00:55, 164.82 permutations/s]
Permutation test:   9%|▊         | 867/10000 [00:04<00:52, 173.47 permutations/s]
Permutation test:   9%|▉         | 890/10000 [00:04<00:48, 187.86 permutations/s]
Permutation test:   9%|▉         | 910/10000 [00:04<00:47, 191.05 permutations/s]
Permutation test:   9%|▉         | 930/10000 [00:04<00:47, 190.54 permutations/s]
Permutation test:  10%|▉         | 952/10000 [00:04<00:45, 198.61 permutations/s]
Permutation test:  10%|▉         | 973/10000 [00:04<00:46, 193.84 permutations/s]
Permutation test:  10%|▉         | 993/10000 [00:04<00:47, 189.66 permutations/s]
Permutation test:  10%|█         | 1013/10000 [00:05<00:50, 179.31 permutations/s]
Permutation test:  10%|█         | 1032/10000 [00:05<00:54, 165.85 permutations/s]
Permutation test:  10%|█         | 1049/10000 [00:05<00:55, 161.29 permutations/s]
Permutation test:  11%|█         | 1066/10000 [00:05<00:58, 152.95 permutations/s]
Permutation test:  11%|█         | 1082/10000 [00:05<00:58, 152.00 permutations/s]
Permutation test:  11%|█         | 1098/10000 [00:05<00:59, 148.91 permutations/s]
Permutation test:  11%|█         | 1113/10000 [00:05<01:00, 146.08 permutations/s]
Permutation test:  11%|█▏        | 1128/10000 [00:05<01:00, 146.33 permutations/s]
Permutation test:  11%|█▏        | 1143/10000 [00:05<01:01, 144.39 permutations/s]
Permutation test:  12%|█▏        | 1159/10000 [00:06<01:00, 146.00 permutations/s]
Permutation test:  12%|█▏        | 1174/10000 [00:06<01:00, 145.29 permutations/s]
Permutation test:  12%|█▏        | 1189/10000 [00:06<01:00, 145.68 permutations/s]
Permutation test:  12%|█▏        | 1204/10000 [00:06<01:00, 146.55 permutations/s]
Permutation test:  12%|█▏        | 1219/10000 [00:06<01:00, 144.99 permutations/s]
Permutation test:  12%|█▏        | 1235/10000 [00:06<01:00, 145.39 permutations/s]
Permutation test:  12%|█▎        | 1250/10000 [00:06<01:00, 145.14 permutations/s]
Permutation test:  13%|█▎        | 1265/10000 [00:06<01:00, 143.66 permutations/s]
Permutation test:  13%|█▎        | 1281/10000 [00:06<01:00, 144.26 permutations/s]
Permutation test:  13%|█▎        | 1296/10000 [00:07<01:01, 142.22 permutations/s]
Permutation test:  13%|█▎        | 1311/10000 [00:07<01:00, 142.81 permutations/s]
Permutation test:  13%|█▎        | 1326/10000 [00:07<01:00, 143.22 permutations/s]
Permutation test:  13%|█▎        | 1341/10000 [00:07<01:00, 143.60 permutations/s]
Permutation test:  14%|█▎        | 1357/10000 [00:07<00:59, 144.50 permutations/s]
Permutation test:  14%|█▎        | 1372/10000 [00:07<01:01, 139.29 permutations/s]
Permutation test:  14%|█▍        | 1387/10000 [00:07<01:02, 137.90 permutations/s]
Permutation test:  14%|█▍        | 1403/10000 [00:07<01:01, 140.64 permutations/s]
Permutation test:  14%|█▍        | 1421/10000 [00:07<00:57, 148.07 permutations/s]
Permutation test:  14%|█▍        | 1436/10000 [00:08<00:58, 146.88 permutations/s]
Permutation test:  15%|█▍        | 1451/10000 [00:08<00:59, 144.08 permutations/s]
Permutation test:  15%|█▍        | 1466/10000 [00:08<00:58, 144.71 permutations/s]
Permutation test:  15%|█▍        | 1481/10000 [00:08<01:00, 141.85 permutations/s]
Permutation test:  15%|█▍        | 1496/10000 [00:08<01:00, 141.41 permutations/s]
Permutation test:  15%|█▌        | 1511/10000 [00:08<00:59, 142.61 permutations/s]
Permutation test:  15%|█▌        | 1528/10000 [00:08<00:56, 148.87 permutations/s]
Permutation test:  15%|█▌        | 1544/10000 [00:08<00:56, 149.64 permutations/s]
Permutation test:  16%|█▌        | 1560/10000 [00:08<00:55, 152.06 permutations/s]
Permutation test:  16%|█▌        | 1576/10000 [00:08<00:58, 144.71 permutations/s]
Permutation test:  16%|█▌        | 1591/10000 [00:09<00:58, 144.48 permutations/s]
Permutation test:  16%|█▌        | 1606/10000 [00:09<00:59, 142.20 permutations/s]
Permutation test:  16%|█▌        | 1621/10000 [00:09<01:00, 139.14 permutations/s]
Permutation test:  16%|█▋        | 1635/10000 [00:09<01:00, 139.31 permutations/s]
Permutation test:  16%|█▋        | 1649/10000 [00:09<01:01, 135.91 permutations/s]
Permutation test:  17%|█▋        | 1664/10000 [00:09<01:00, 137.40 permutations/s]
Permutation test:  17%|█▋        | 1678/10000 [00:09<01:00, 137.35 permutations/s]
Permutation test:  17%|█▋        | 1694/10000 [00:09<00:57, 143.46 permutations/s]
Permutation test:  17%|█▋        | 1711/10000 [00:09<00:56, 147.32 permutations/s]
Permutation test:  17%|█▋        | 1727/10000 [00:10<00:56, 146.35 permutations/s]
Permutation test:  17%|█▋        | 1742/10000 [00:10<00:57, 144.50 permutations/s]
Permutation test:  18%|█▊        | 1758/10000 [00:10<00:56, 146.44 permutations/s]
Permutation test:  18%|█▊        | 1773/10000 [00:10<00:56, 144.63 permutations/s]
Permutation test:  18%|█▊        | 1788/10000 [00:10<00:58, 140.72 permutations/s]
Permutation test:  18%|█▊        | 1803/10000 [00:10<00:57, 142.66 permutations/s]
Permutation test:  18%|█▊        | 1818/10000 [00:10<00:58, 140.69 permutations/s]
Permutation test:  18%|█▊        | 1833/10000 [00:10<00:57, 142.62 permutations/s]
Permutation test:  18%|█▊        | 1848/10000 [00:10<00:58, 139.47 permutations/s]
Permutation test:  19%|█▊        | 1862/10000 [00:10<00:58, 139.35 permutations/s]
Permutation test:  19%|█▉        | 1877/10000 [00:11<00:57, 140.70 permutations/s]
Permutation test:  19%|█▉        | 1892/10000 [00:11<00:57, 140.52 permutations/s]
Permutation test:  19%|█▉        | 1907/10000 [00:11<00:57, 140.04 permutations/s]
Permutation test:  19%|█▉        | 1922/10000 [00:11<00:59, 134.89 permutations/s]
Permutation test:  19%|█▉        | 1937/10000 [00:11<00:59, 136.50 permutations/s]
Permutation test:  20%|█▉        | 1951/10000 [00:11<00:58, 136.81 permutations/s]
Permutation test:  20%|█▉        | 1965/10000 [00:11<00:59, 135.49 permutations/s]
Permutation test:  20%|█▉        | 1981/10000 [00:11<00:56, 142.11 permutations/s]
Permutation test:  20%|█▉        | 1996/10000 [00:11<00:56, 142.83 permutations/s]
Permutation test:  20%|██        | 2011/10000 [00:12<00:55, 143.99 permutations/s]
Permutation test:  20%|██        | 2026/10000 [00:12<00:55, 143.21 permutations/s]
Permutation test:  20%|██        | 2042/10000 [00:12<00:53, 147.74 permutations/s]
Permutation test:  21%|██        | 2057/10000 [00:12<00:53, 147.40 permutations/s]
Permutation test:  21%|██        | 2073/10000 [00:12<00:53, 147.80 permutations/s]
Permutation test:  21%|██        | 2088/10000 [00:12<00:55, 142.93 permutations/s]
Permutation test:  21%|██        | 2103/10000 [00:12<00:57, 138.49 permutations/s]
Permutation test:  21%|██        | 2118/10000 [00:12<00:55, 141.35 permutations/s]
Permutation test:  21%|██▏       | 2133/10000 [00:12<00:56, 140.33 permutations/s]
Permutation test:  21%|██▏       | 2148/10000 [00:13<00:57, 136.71 permutations/s]
Permutation test:  22%|██▏       | 2162/10000 [00:13<00:56, 137.60 permutations/s]
Permutation test:  22%|██▏       | 2177/10000 [00:13<00:55, 140.00 permutations/s]
Permutation test:  22%|██▏       | 2192/10000 [00:13<00:56, 138.56 permutations/s]
Permutation test:  22%|██▏       | 2206/10000 [00:13<00:57, 134.76 permutations/s]
Permutation test:  22%|██▏       | 2220/10000 [00:13<00:58, 133.99 permutations/s]
Permutation test:  22%|██▏       | 2234/10000 [00:13<00:59, 131.59 permutations/s]
Permutation test:  22%|██▏       | 2249/10000 [00:13<00:57, 135.59 permutations/s]
Permutation test:  23%|██▎       | 2265/10000 [00:13<00:54, 140.95 permutations/s]
Permutation test:  23%|██▎       | 2280/10000 [00:13<00:55, 139.23 permutations/s]
Permutation test:  23%|██▎       | 2294/10000 [00:14<00:57, 134.70 permutations/s]
Permutation test:  23%|██▎       | 2309/10000 [00:14<00:56, 136.46 permutations/s]
Permutation test:  23%|██▎       | 2324/10000 [00:14<00:55, 138.04 permutations/s]
Permutation test:  23%|██▎       | 2339/10000 [00:14<00:55, 137.18 permutations/s]
Permutation test:  24%|██▎       | 2355/10000 [00:14<00:54, 141.03 permutations/s]
Permutation test:  24%|██▎       | 2370/10000 [00:14<00:53, 141.74 permutations/s]
Permutation test:  24%|██▍       | 2385/10000 [00:14<00:54, 139.46 permutations/s]
Permutation test:  24%|██▍       | 2399/10000 [00:14<00:54, 139.32 permutations/s]
Permutation test:  24%|██▍       | 2414/10000 [00:14<00:53, 141.25 permutations/s]
Permutation test:  24%|██▍       | 2430/10000 [00:15<00:53, 142.15 permutations/s]
Permutation test:  24%|██▍       | 2445/10000 [00:15<00:54, 139.76 permutations/s]
Permutation test:  25%|██▍       | 2460/10000 [00:15<00:53, 139.64 permutations/s]
Permutation test:  25%|██▍       | 2475/10000 [00:15<00:53, 140.56 permutations/s]
Permutation test:  25%|██▍       | 2490/10000 [00:15<00:52, 142.76 permutations/s]
Permutation test:  25%|██▌       | 2507/10000 [00:15<00:50, 148.39 permutations/s]
Permutation test:  25%|██▌       | 2523/10000 [00:15<00:49, 150.71 permutations/s]
Permutation test:  25%|██▌       | 2539/10000 [00:15<00:50, 149.13 permutations/s]
Permutation test:  26%|██▌       | 2560/10000 [00:15<00:45, 164.45 permutations/s]
Permutation test:  26%|██▌       | 2578/10000 [00:16<00:44, 168.22 permutations/s]
Permutation test:  26%|██▌       | 2595/10000 [00:16<00:44, 164.94 permutations/s]
Permutation test:  26%|██▌       | 2613/10000 [00:16<00:44, 164.44 permutations/s]
Permutation test:  26%|██▋       | 2631/10000 [00:16<00:44, 165.70 permutations/s]
Permutation test:  27%|██▋       | 2652/10000 [00:16<00:41, 176.16 permutations/s]
Permutation test:  27%|██▋       | 2673/10000 [00:16<00:39, 185.22 permutations/s]
Permutation test:  27%|██▋       | 2692/10000 [00:16<00:39, 183.21 permutations/s]
Permutation test:  27%|██▋       | 2712/10000 [00:16<00:39, 184.89 permutations/s]
Permutation test:  27%|██▋       | 2734/10000 [00:16<00:37, 192.93 permutations/s]
Permutation test:  28%|██▊       | 2754/10000 [00:16<00:37, 192.72 permutations/s]
Permutation test:  28%|██▊       | 2774/10000 [00:17<00:37, 193.07 permutations/s]
Permutation test:  28%|██▊       | 2794/10000 [00:17<00:37, 193.79 permutations/s]
Permutation test:  28%|██▊       | 2814/10000 [00:17<00:36, 195.37 permutations/s]
Permutation test:  28%|██▊       | 2834/10000 [00:17<00:37, 193.08 permutations/s]
Permutation test:  29%|██▊       | 2854/10000 [00:17<00:39, 181.85 permutations/s]
Permutation test:  29%|██▊       | 2873/10000 [00:17<00:39, 179.59 permutations/s]
Permutation test:  29%|██▉       | 2892/10000 [00:17<00:44, 159.89 permutations/s]
Permutation test:  29%|██▉       | 2909/10000 [00:17<00:43, 161.76 permutations/s]
Permutation test:  29%|██▉       | 2927/10000 [00:17<00:42, 165.72 permutations/s]
Permutation test:  29%|██▉       | 2944/10000 [00:18<00:42, 166.61 permutations/s]
Permutation test:  30%|██▉       | 2961/10000 [00:18<00:42, 166.58 permutations/s]
Permutation test:  30%|██▉       | 2983/10000 [00:18<00:39, 179.21 permutations/s]
Permutation test:  30%|███       | 3003/10000 [00:18<00:38, 182.76 permutations/s]
Permutation test:  30%|███       | 3023/10000 [00:18<00:37, 185.52 permutations/s]
Permutation test:  30%|███       | 3045/10000 [00:18<00:35, 193.62 permutations/s]
Permutation test:  31%|███       | 3065/10000 [00:18<00:35, 193.50 permutations/s]
Permutation test:  31%|███       | 3085/10000 [00:18<00:35, 193.12 permutations/s]
Permutation test:  31%|███       | 3105/10000 [00:18<00:35, 193.97 permutations/s]
Permutation test:  31%|███▏      | 3125/10000 [00:18<00:35, 192.57 permutations/s]
Permutation test:  31%|███▏      | 3145/10000 [00:19<00:36, 189.48 permutations/s]
Permutation test:  32%|███▏      | 3164/10000 [00:19<00:40, 168.24 permutations/s]
Permutation test:  32%|███▏      | 3182/10000 [00:19<00:40, 167.58 permutations/s]
Permutation test:  32%|███▏      | 3200/10000 [00:19<00:41, 165.69 permutations/s]
Permutation test:  32%|███▏      | 3217/10000 [00:19<00:43, 155.58 permutations/s]
Permutation test:  32%|███▏      | 3233/10000 [00:19<00:45, 148.85 permutations/s]
Permutation test:  32%|███▏      | 3249/10000 [00:19<00:44, 150.44 permutations/s]
Permutation test:  33%|███▎      | 3265/10000 [00:19<00:46, 144.14 permutations/s]
Permutation test:  33%|███▎      | 3280/10000 [00:20<00:46, 143.23 permutations/s]
Permutation test:  33%|███▎      | 3295/10000 [00:20<00:47, 141.12 permutations/s]
Permutation test:  33%|███▎      | 3310/10000 [00:20<00:48, 139.23 permutations/s]
Permutation test:  33%|███▎      | 3324/10000 [00:20<00:48, 137.84 permutations/s]
Permutation test:  33%|███▎      | 3340/10000 [00:20<00:46, 143.22 permutations/s]
Permutation test:  34%|███▎      | 3355/10000 [00:20<00:45, 144.57 permutations/s]
Permutation test:  34%|███▎      | 3370/10000 [00:20<00:45, 144.67 permutations/s]
Permutation test:  34%|███▍      | 3385/10000 [00:20<00:47, 139.44 permutations/s]
Permutation test:  34%|███▍      | 3401/10000 [00:20<00:46, 143.21 permutations/s]
Permutation test:  34%|███▍      | 3417/10000 [00:21<00:44, 147.63 permutations/s]
Permutation test:  34%|███▍      | 3432/10000 [00:21<00:45, 144.86 permutations/s]
Permutation test:  34%|███▍      | 3447/10000 [00:21<00:46, 140.37 permutations/s]
Permutation test:  35%|███▍      | 3462/10000 [00:21<00:46, 140.27 permutations/s]
Permutation test:  35%|███▍      | 3477/10000 [00:21<00:46, 140.99 permutations/s]
Permutation test:  35%|███▍      | 3493/10000 [00:21<00:45, 142.37 permutations/s]
Permutation test:  35%|███▌      | 3509/10000 [00:21<00:44, 145.32 permutations/s]
Permutation test:  35%|███▌      | 3524/10000 [00:21<00:44, 143.94 permutations/s]
Permutation test:  35%|███▌      | 3540/10000 [00:21<00:44, 146.68 permutations/s]
Permutation test:  36%|███▌      | 3555/10000 [00:21<00:45, 143.10 permutations/s]
Permutation test:  36%|███▌      | 3570/10000 [00:22<00:44, 144.28 permutations/s]
Permutation test:  36%|███▌      | 3585/10000 [00:22<00:44, 144.00 permutations/s]
Permutation test:  36%|███▌      | 3601/10000 [00:22<00:43, 145.94 permutations/s]
Permutation test:  36%|███▌      | 3617/10000 [00:22<00:43, 146.08 permutations/s]
Permutation test:  36%|███▋      | 3632/10000 [00:22<00:45, 141.29 permutations/s]
Permutation test:  36%|███▋      | 3647/10000 [00:22<00:44, 141.36 permutations/s]
Permutation test:  37%|███▋      | 3662/10000 [00:22<00:44, 141.77 permutations/s]
Permutation test:  37%|███▋      | 3677/10000 [00:22<00:44, 140.54 permutations/s]
Permutation test:  37%|███▋      | 3692/10000 [00:22<00:49, 126.31 permutations/s]
Permutation test:  37%|███▋      | 3706/10000 [00:23<00:49, 126.60 permutations/s]
Permutation test:  37%|███▋      | 3720/10000 [00:23<00:48, 129.94 permutations/s]
Permutation test:  37%|███▋      | 3735/10000 [00:23<00:46, 133.91 permutations/s]
Permutation test:  38%|███▊      | 3750/10000 [00:23<00:45, 137.66 permutations/s]
Permutation test:  38%|███▊      | 3766/10000 [00:23<00:43, 143.62 permutations/s]
Permutation test:  38%|███▊      | 3781/10000 [00:23<00:44, 138.74 permutations/s]
Permutation test:  38%|███▊      | 3795/10000 [00:23<00:44, 138.93 permutations/s]
Permutation test:  38%|███▊      | 3810/10000 [00:23<00:44, 138.96 permutations/s]
Permutation test:  38%|███▊      | 3824/10000 [00:23<00:45, 136.00 permutations/s]
Permutation test:  38%|███▊      | 3838/10000 [00:24<00:46, 133.54 permutations/s]
Permutation test:  39%|███▊      | 3852/10000 [00:24<00:46, 132.71 permutations/s]
Permutation test:  39%|███▊      | 3866/10000 [00:24<00:46, 132.18 permutations/s]
Permutation test:  39%|███▉      | 3880/10000 [00:24<00:45, 134.23 permutations/s]
Permutation test:  39%|███▉      | 3896/10000 [00:24<00:43, 138.91 permutations/s]
Permutation test:  39%|███▉      | 3912/10000 [00:24<00:42, 143.75 permutations/s]
Permutation test:  39%|███▉      | 3927/10000 [00:24<00:43, 139.19 permutations/s]
Permutation test:  39%|███▉      | 3941/10000 [00:24<00:45, 133.06 permutations/s]
Permutation test:  40%|███▉      | 3957/10000 [00:24<00:44, 136.17 permutations/s]
Permutation test:  40%|███▉      | 3973/10000 [00:25<00:42, 140.27 permutations/s]
Permutation test:  40%|███▉      | 3988/10000 [00:25<00:42, 142.22 permutations/s]
Permutation test:  40%|████      | 4003/10000 [00:25<00:42, 140.67 permutations/s]
Permutation test:  40%|████      | 4018/10000 [00:25<00:42, 140.33 permutations/s]
Permutation test:  40%|████      | 4033/10000 [00:25<00:43, 137.10 permutations/s]
Permutation test:  40%|████      | 4047/10000 [00:25<00:43, 135.46 permutations/s]
Permutation test:  41%|████      | 4062/10000 [00:25<00:42, 139.06 permutations/s]
Permutation test:  41%|████      | 4076/10000 [00:25<00:42, 138.54 permutations/s]
Permutation test:  41%|████      | 4090/10000 [00:25<00:43, 136.93 permutations/s]
Permutation test:  41%|████      | 4104/10000 [00:25<00:42, 137.79 permutations/s]
Permutation test:  41%|████      | 4119/10000 [00:26<00:41, 140.56 permutations/s]
Permutation test:  41%|████▏     | 4134/10000 [00:26<00:41, 141.47 permutations/s]
Permutation test:  41%|████▏     | 4149/10000 [00:26<00:40, 143.27 permutations/s]
Permutation test:  42%|████▏     | 4164/10000 [00:26<00:40, 145.01 permutations/s]
Permutation test:  42%|████▏     | 4179/10000 [00:26<00:41, 141.19 permutations/s]
Permutation test:  42%|████▏     | 4196/10000 [00:26<00:40, 144.26 permutations/s]
Permutation test:  42%|████▏     | 4211/10000 [00:26<00:41, 139.89 permutations/s]
Permutation test:  42%|████▏     | 4226/10000 [00:26<00:41, 137.79 permutations/s]
Permutation test:  42%|████▏     | 4240/10000 [00:26<00:41, 138.08 permutations/s]
Permutation test:  43%|████▎     | 4254/10000 [00:27<00:41, 137.26 permutations/s]
Permutation test:  43%|████▎     | 4268/10000 [00:27<00:42, 135.89 permutations/s]
Permutation test:  43%|████▎     | 4283/10000 [00:27<00:41, 137.92 permutations/s]
Permutation test:  43%|████▎     | 4297/10000 [00:27<00:41, 137.99 permutations/s]
Permutation test:  43%|████▎     | 4312/10000 [00:27<00:40, 140.68 permutations/s]
Permutation test:  43%|████▎     | 4327/10000 [00:27<00:41, 137.04 permutations/s]
Permutation test:  43%|████▎     | 4342/10000 [00:27<00:41, 136.55 permutations/s]
Permutation test:  44%|████▎     | 4358/10000 [00:27<00:40, 139.99 permutations/s]
Permutation test:  44%|████▍     | 4376/10000 [00:27<00:38, 147.57 permutations/s]
Permutation test:  44%|████▍     | 4393/10000 [00:27<00:37, 150.97 permutations/s]
Permutation test:  44%|████▍     | 4409/10000 [00:28<00:38, 146.13 permutations/s]
Permutation test:  44%|████▍     | 4424/10000 [00:28<00:38, 145.90 permutations/s]
Permutation test:  44%|████▍     | 4439/10000 [00:28<00:38, 143.20 permutations/s]
Permutation test:  45%|████▍     | 4455/10000 [00:28<00:38, 145.69 permutations/s]
Permutation test:  45%|████▍     | 4471/10000 [00:28<00:37, 148.90 permutations/s]
Permutation test:  45%|████▍     | 4486/10000 [00:28<00:38, 141.73 permutations/s]
Permutation test:  45%|████▌     | 4502/10000 [00:28<00:38, 141.82 permutations/s]
Permutation test:  45%|████▌     | 4517/10000 [00:28<00:38, 143.73 permutations/s]
Permutation test:  45%|████▌     | 4533/10000 [00:28<00:37, 146.68 permutations/s]
Permutation test:  45%|████▌     | 4548/10000 [00:29<00:37, 147.10 permutations/s]
Permutation test:  46%|████▌     | 4563/10000 [00:29<00:38, 139.51 permutations/s]
Permutation test:  46%|████▌     | 4578/10000 [00:29<00:38, 139.75 permutations/s]
Permutation test:  46%|████▌     | 4593/10000 [00:29<00:38, 139.59 permutations/s]
Permutation test:  46%|████▌     | 4608/10000 [00:29<00:40, 134.38 permutations/s]
Permutation test:  46%|████▌     | 4624/10000 [00:29<00:39, 137.36 permutations/s]
Permutation test:  46%|████▋     | 4639/10000 [00:29<00:38, 140.03 permutations/s]
Permutation test:  47%|████▋     | 4654/10000 [00:29<00:38, 140.12 permutations/s]
Permutation test:  47%|████▋     | 4669/10000 [00:29<00:39, 134.06 permutations/s]
Permutation test:  47%|████▋     | 4685/10000 [00:30<00:38, 138.49 permutations/s]
Permutation test:  47%|████▋     | 4700/10000 [00:30<00:37, 139.70 permutations/s]
Permutation test:  47%|████▋     | 4715/10000 [00:30<00:37, 140.41 permutations/s]
Permutation test:  47%|████▋     | 4730/10000 [00:30<00:38, 135.77 permutations/s]
Permutation test:  47%|████▋     | 4744/10000 [00:30<00:39, 134.38 permutations/s]
Permutation test:  48%|████▊     | 4759/10000 [00:30<00:38, 134.58 permutations/s]
Permutation test:  48%|████▊     | 4773/10000 [00:30<00:38, 135.39 permutations/s]
Permutation test:  48%|████▊     | 4787/10000 [00:30<00:39, 132.61 permutations/s]
Permutation test:  48%|████▊     | 4802/10000 [00:30<00:38, 134.05 permutations/s]
Permutation test:  48%|████▊     | 4818/10000 [00:31<00:38, 135.89 permutations/s]
Permutation test:  48%|████▊     | 4832/10000 [00:31<00:37, 136.84 permutations/s]
Permutation test:  48%|████▊     | 4847/10000 [00:31<00:37, 138.76 permutations/s]
Permutation test:  49%|████▊     | 4861/10000 [00:31<00:38, 134.72 permutations/s]
Permutation test:  49%|████▉     | 4875/10000 [00:31<00:38, 132.32 permutations/s]
Permutation test:  49%|████▉     | 4890/10000 [00:31<00:38, 134.27 permutations/s]
Permutation test:  49%|████▉     | 4904/10000 [00:31<00:37, 135.85 permutations/s]
Permutation test:  49%|████▉     | 4919/10000 [00:31<00:36, 138.51 permutations/s]
Permutation test:  49%|████▉     | 4934/10000 [00:31<00:36, 140.15 permutations/s]
Permutation test:  49%|████▉     | 4949/10000 [00:32<00:36, 139.29 permutations/s]
Permutation test:  50%|████▉     | 4964/10000 [00:32<00:35, 141.17 permutations/s]
Permutation test:  50%|████▉     | 4979/10000 [00:32<00:36, 139.35 permutations/s]
Permutation test:  50%|████▉     | 4994/10000 [00:32<00:35, 141.79 permutations/s]
Permutation test:  50%|█████     | 5009/10000 [00:32<00:35, 141.91 permutations/s]
Permutation test:  50%|█████     | 5026/10000 [00:32<00:34, 145.84 permutations/s]
Permutation test:  50%|█████     | 5041/10000 [00:32<00:34, 145.30 permutations/s]
Permutation test:  51%|█████     | 5056/10000 [00:32<00:34, 141.60 permutations/s]
Permutation test:  51%|█████     | 5071/10000 [00:32<00:35, 140.25 permutations/s]
Permutation test:  51%|█████     | 5086/10000 [00:32<00:34, 141.60 permutations/s]
Permutation test:  51%|█████     | 5101/10000 [00:33<00:34, 141.03 permutations/s]
Permutation test:  51%|█████     | 5116/10000 [00:33<00:34, 143.48 permutations/s]
Permutation test:  51%|█████▏    | 5131/10000 [00:33<00:35, 136.58 permutations/s]
Permutation test:  51%|█████▏    | 5145/10000 [00:33<00:36, 132.47 permutations/s]
Permutation test:  52%|█████▏    | 5160/10000 [00:33<00:35, 137.25 permutations/s]
Permutation test:  52%|█████▏    | 5176/10000 [00:33<00:34, 141.11 permutations/s]
Permutation test:  52%|█████▏    | 5191/10000 [00:33<00:33, 142.28 permutations/s]
Permutation test:  52%|█████▏    | 5206/10000 [00:33<00:34, 140.84 permutations/s]
Permutation test:  52%|█████▏    | 5221/10000 [00:33<00:33, 141.90 permutations/s]
Permutation test:  52%|█████▏    | 5236/10000 [00:34<00:33, 141.33 permutations/s]
Permutation test:  53%|█████▎    | 5251/10000 [00:34<00:35, 134.80 permutations/s]
Permutation test:  53%|█████▎    | 5266/10000 [00:34<00:34, 137.66 permutations/s]
Permutation test:  53%|█████▎    | 5280/10000 [00:34<00:34, 135.44 permutations/s]
Permutation test:  53%|█████▎    | 5296/10000 [00:34<00:33, 141.87 permutations/s]
Permutation test:  53%|█████▎    | 5312/10000 [00:34<00:32, 143.22 permutations/s]
Permutation test:  53%|█████▎    | 5327/10000 [00:34<00:32, 142.55 permutations/s]
Permutation test:  53%|█████▎    | 5342/10000 [00:34<00:33, 140.99 permutations/s]
Permutation test:  54%|█████▎    | 5357/10000 [00:34<00:33, 139.51 permutations/s]
Permutation test:  54%|█████▎    | 5373/10000 [00:35<00:32, 143.43 permutations/s]
Permutation test:  54%|█████▍    | 5388/10000 [00:35<00:31, 145.15 permutations/s]
Permutation test:  54%|█████▍    | 5403/10000 [00:35<00:32, 143.26 permutations/s]
Permutation test:  54%|█████▍    | 5418/10000 [00:35<00:32, 139.54 permutations/s]
Permutation test:  54%|█████▍    | 5432/10000 [00:35<00:33, 137.68 permutations/s]
Permutation test:  54%|█████▍    | 5446/10000 [00:35<00:33, 137.17 permutations/s]
Permutation test:  55%|█████▍    | 5460/10000 [00:35<00:33, 137.04 permutations/s]
Permutation test:  55%|█████▍    | 5474/10000 [00:35<00:32, 137.29 permutations/s]
Permutation test:  55%|█████▍    | 5489/10000 [00:35<00:32, 140.12 permutations/s]
Permutation test:  55%|█████▌    | 5504/10000 [00:35<00:32, 139.08 permutations/s]
Permutation test:  55%|█████▌    | 5519/10000 [00:36<00:31, 140.85 permutations/s]
Permutation test:  55%|█████▌    | 5534/10000 [00:36<00:31, 140.99 permutations/s]
Permutation test:  56%|█████▌    | 5550/10000 [00:36<00:31, 142.94 permutations/s]
Permutation test:  56%|█████▌    | 5565/10000 [00:36<00:31, 142.73 permutations/s]
Permutation test:  56%|█████▌    | 5580/10000 [00:36<00:31, 139.01 permutations/s]
Permutation test:  56%|█████▌    | 5594/10000 [00:36<00:31, 137.87 permutations/s]
Permutation test:  56%|█████▌    | 5609/10000 [00:36<00:31, 139.75 permutations/s]
Permutation test:  56%|█████▌    | 5624/10000 [00:36<00:31, 140.79 permutations/s]
Permutation test:  56%|█████▋    | 5639/10000 [00:36<00:30, 143.33 permutations/s]
Permutation test:  57%|█████▋    | 5655/10000 [00:37<00:30, 144.62 permutations/s]
Permutation test:  57%|█████▋    | 5670/10000 [00:37<00:30, 144.08 permutations/s]
Permutation test:  57%|█████▋    | 5686/10000 [00:37<00:29, 145.67 permutations/s]
Permutation test:  57%|█████▋    | 5701/10000 [00:37<00:30, 142.01 permutations/s]
Permutation test:  57%|█████▋    | 5716/10000 [00:37<00:30, 140.27 permutations/s]
Permutation test:  57%|█████▋    | 5731/10000 [00:37<00:30, 138.81 permutations/s]
Permutation test:  57%|█████▋    | 5745/10000 [00:37<00:30, 138.12 permutations/s]
Permutation test:  58%|█████▊    | 5759/10000 [00:37<00:30, 138.12 permutations/s]
Permutation test:  58%|█████▊    | 5775/10000 [00:37<00:29, 143.99 permutations/s]
Permutation test:  58%|█████▊    | 5790/10000 [00:37<00:29, 145.13 permutations/s]
Permutation test:  58%|█████▊    | 5805/10000 [00:38<00:29, 142.49 permutations/s]
Permutation test:  58%|█████▊    | 5820/10000 [00:38<00:29, 139.50 permutations/s]
Permutation test:  58%|█████▊    | 5835/10000 [00:38<00:29, 139.25 permutations/s]
Permutation test:  58%|█████▊    | 5849/10000 [00:38<00:30, 137.51 permutations/s]
Permutation test:  59%|█████▊    | 5864/10000 [00:38<00:29, 141.06 permutations/s]
Permutation test:  59%|█████▉    | 5879/10000 [00:38<00:30, 136.91 permutations/s]
Permutation test:  59%|█████▉    | 5895/10000 [00:38<00:29, 140.70 permutations/s]
Permutation test:  59%|█████▉    | 5910/10000 [00:38<00:28, 141.75 permutations/s]
Permutation test:  59%|█████▉    | 5925/10000 [00:38<00:28, 143.08 permutations/s]
Permutation test:  59%|█████▉    | 5940/10000 [00:39<00:28, 140.30 permutations/s]
Permutation test:  60%|█████▉    | 5955/10000 [00:39<00:29, 136.69 permutations/s]
Permutation test:  60%|█████▉    | 5969/10000 [00:39<00:29, 137.54 permutations/s]
Permutation test:  60%|█████▉    | 5983/10000 [00:39<00:30, 132.72 permutations/s]
Permutation test:  60%|█████▉    | 5997/10000 [00:39<00:29, 134.50 permutations/s]
Permutation test:  60%|██████    | 6011/10000 [00:39<00:30, 132.71 permutations/s]
Permutation test:  60%|██████    | 6026/10000 [00:39<00:29, 136.75 permutations/s]
Permutation test:  60%|██████    | 6040/10000 [00:39<00:29, 133.26 permutations/s]
Permutation test:  61%|██████    | 6056/10000 [00:39<00:28, 138.08 permutations/s]
Permutation test:  61%|██████    | 6071/10000 [00:40<00:28, 139.06 permutations/s]
Permutation test:  61%|██████    | 6086/10000 [00:40<00:28, 137.16 permutations/s]
Permutation test:  61%|██████    | 6100/10000 [00:40<00:28, 137.05 permutations/s]
Permutation test:  61%|██████    | 6115/10000 [00:40<00:27, 138.86 permutations/s]
Permutation test:  61%|██████▏   | 6131/10000 [00:40<00:26, 143.30 permutations/s]
Permutation test:  61%|██████▏   | 6146/10000 [00:40<00:26, 145.16 permutations/s]
Permutation test:  62%|██████▏   | 6161/10000 [00:40<00:27, 141.33 permutations/s]
Permutation test:  62%|██████▏   | 6176/10000 [00:40<00:27, 137.96 permutations/s]
Permutation test:  62%|██████▏   | 6190/10000 [00:40<00:28, 134.53 permutations/s]
Permutation test:  62%|██████▏   | 6207/10000 [00:40<00:26, 142.69 permutations/s]
Permutation test:  62%|██████▏   | 6222/10000 [00:41<00:26, 141.99 permutations/s]
Permutation test:  62%|██████▏   | 6237/10000 [00:41<00:27, 137.53 permutations/s]
Permutation test:  63%|██████▎   | 6251/10000 [00:41<00:27, 137.82 permutations/s]
Permutation test:  63%|██████▎   | 6271/10000 [00:41<00:24, 153.34 permutations/s]
Permutation test:  63%|██████▎   | 6289/10000 [00:41<00:23, 160.38 permutations/s]
Permutation test:  63%|██████▎   | 6309/10000 [00:41<00:21, 170.58 permutations/s]
Permutation test:  63%|██████▎   | 6327/10000 [00:41<00:21, 171.85 permutations/s]
Permutation test:  63%|██████▎   | 6346/10000 [00:41<00:20, 177.06 permutations/s]
Permutation test:  64%|██████▎   | 6364/10000 [00:41<00:20, 174.84 permutations/s]
Permutation test:  64%|██████▍   | 6385/10000 [00:42<00:19, 183.76 permutations/s]
Permutation test:  64%|██████▍   | 6404/10000 [00:42<00:19, 181.63 permutations/s]
Permutation test:  64%|██████▍   | 6423/10000 [00:42<00:19, 183.91 permutations/s]
Permutation test:  64%|██████▍   | 6442/10000 [00:42<00:19, 179.48 permutations/s]
Permutation test:  65%|██████▍   | 6462/10000 [00:42<00:19, 183.26 permutations/s]
Permutation test:  65%|██████▍   | 6481/10000 [00:42<00:19, 183.65 permutations/s]
Permutation test:  65%|██████▌   | 6500/10000 [00:42<00:19, 177.22 permutations/s]
Permutation test:  65%|██████▌   | 6518/10000 [00:42<00:19, 174.37 permutations/s]
Permutation test:  65%|██████▌   | 6537/10000 [00:42<00:19, 177.79 permutations/s]
Permutation test:  66%|██████▌   | 6558/10000 [00:42<00:18, 186.62 permutations/s]
Permutation test:  66%|██████▌   | 6577/10000 [00:43<00:18, 185.62 permutations/s]
Permutation test:  66%|██████▌   | 6596/10000 [00:43<00:18, 182.62 permutations/s]
Permutation test:  66%|██████▌   | 6615/10000 [00:43<00:19, 175.89 permutations/s]
Permutation test:  66%|██████▋   | 6634/10000 [00:43<00:18, 178.09 permutations/s]
Permutation test:  67%|██████▋   | 6653/10000 [00:43<00:18, 178.52 permutations/s]
Permutation test:  67%|██████▋   | 6671/10000 [00:43<00:19, 174.57 permutations/s]
Permutation test:  67%|██████▋   | 6689/10000 [00:43<00:19, 174.26 permutations/s]
Permutation test:  67%|██████▋   | 6707/10000 [00:43<00:19, 173.27 permutations/s]
Permutation test:  67%|██████▋   | 6725/10000 [00:43<00:19, 170.95 permutations/s]
Permutation test:  67%|██████▋   | 6743/10000 [00:44<00:19, 168.48 permutations/s]
Permutation test:  68%|██████▊   | 6760/10000 [00:44<00:19, 166.90 permutations/s]
Permutation test:  68%|██████▊   | 6780/10000 [00:44<00:18, 172.51 permutations/s]
Permutation test:  68%|██████▊   | 6800/10000 [00:44<00:18, 175.46 permutations/s]
Permutation test:  68%|██████▊   | 6818/10000 [00:44<00:18, 173.77 permutations/s]
Permutation test:  68%|██████▊   | 6836/10000 [00:44<00:18, 170.69 permutations/s]
Permutation test:  69%|██████▊   | 6855/10000 [00:44<00:18, 174.30 permutations/s]
Permutation test:  69%|██████▊   | 6873/10000 [00:44<00:17, 175.54 permutations/s]
Permutation test:  69%|██████▉   | 6892/10000 [00:44<00:17, 178.16 permutations/s]
Permutation test:  69%|██████▉   | 6910/10000 [00:45<00:17, 175.35 permutations/s]
Permutation test:  69%|██████▉   | 6928/10000 [00:45<00:17, 174.06 permutations/s]
Permutation test:  69%|██████▉   | 6946/10000 [00:45<00:17, 171.34 permutations/s]
Permutation test:  70%|██████▉   | 6964/10000 [00:45<00:18, 167.74 permutations/s]
Permutation test:  70%|██████▉   | 6982/10000 [00:45<00:17, 170.16 permutations/s]
Permutation test:  70%|███████   | 7000/10000 [00:45<00:17, 169.19 permutations/s]
Permutation test:  70%|███████   | 7018/10000 [00:45<00:17, 171.85 permutations/s]
Permutation test:  70%|███████   | 7036/10000 [00:45<00:17, 171.67 permutations/s]
Permutation test:  71%|███████   | 7054/10000 [00:45<00:17, 172.37 permutations/s]
Permutation test:  71%|███████   | 7072/10000 [00:45<00:16, 172.81 permutations/s]
Permutation test:  71%|███████   | 7091/10000 [00:46<00:16, 177.09 permutations/s]
Permutation test:  71%|███████   | 7109/10000 [00:46<00:16, 172.93 permutations/s]
Permutation test:  71%|███████▏  | 7127/10000 [00:46<00:16, 170.13 permutations/s]
Permutation test:  71%|███████▏  | 7145/10000 [00:46<00:17, 165.09 permutations/s]
Permutation test:  72%|███████▏  | 7162/10000 [00:46<00:17, 166.21 permutations/s]
Permutation test:  72%|███████▏  | 7179/10000 [00:46<00:17, 163.61 permutations/s]
Permutation test:  72%|███████▏  | 7196/10000 [00:46<00:17, 164.14 permutations/s]
Permutation test:  72%|███████▏  | 7213/10000 [00:46<00:17, 162.99 permutations/s]
Permutation test:  72%|███████▏  | 7230/10000 [00:46<00:18, 152.03 permutations/s]
Permutation test:  72%|███████▏  | 7246/10000 [00:47<00:19, 144.34 permutations/s]
Permutation test:  73%|███████▎  | 7261/10000 [00:47<00:19, 143.19 permutations/s]
Permutation test:  73%|███████▎  | 7276/10000 [00:47<00:19, 142.25 permutations/s]
Permutation test:  73%|███████▎  | 7291/10000 [00:47<00:19, 141.76 permutations/s]
Permutation test:  73%|███████▎  | 7306/10000 [00:47<00:18, 142.63 permutations/s]
Permutation test:  73%|███████▎  | 7321/10000 [00:47<00:19, 138.14 permutations/s]
Permutation test:  73%|███████▎  | 7335/10000 [00:47<00:19, 134.67 permutations/s]
Permutation test:  73%|███████▎  | 7349/10000 [00:47<00:20, 131.92 permutations/s]
Permutation test:  74%|███████▎  | 7363/10000 [00:47<00:20, 130.66 permutations/s]
Permutation test:  74%|███████▍  | 7377/10000 [00:48<00:19, 133.14 permutations/s]
Permutation test:  74%|███████▍  | 7392/10000 [00:48<00:19, 133.63 permutations/s]
Permutation test:  74%|███████▍  | 7408/10000 [00:48<00:18, 137.38 permutations/s]
Permutation test:  74%|███████▍  | 7422/10000 [00:48<00:19, 134.88 permutations/s]
Permutation test:  74%|███████▍  | 7436/10000 [00:48<00:18, 135.92 permutations/s]
Permutation test:  75%|███████▍  | 7451/10000 [00:48<00:18, 137.88 permutations/s]
Permutation test:  75%|███████▍  | 7466/10000 [00:48<00:17, 141.11 permutations/s]
Permutation test:  75%|███████▍  | 7481/10000 [00:48<00:18, 137.53 permutations/s]
Permutation test:  75%|███████▍  | 7495/10000 [00:48<00:18, 135.42 permutations/s]
Permutation test:  75%|███████▌  | 7510/10000 [00:49<00:18, 136.16 permutations/s]
Permutation test:  75%|███████▌  | 7525/10000 [00:49<00:17, 139.98 permutations/s]
Permutation test:  75%|███████▌  | 7540/10000 [00:49<00:17, 138.35 permutations/s]
Permutation test:  76%|███████▌  | 7556/10000 [00:49<00:17, 141.35 permutations/s]
Permutation test:  76%|███████▌  | 7571/10000 [00:49<00:17, 135.67 permutations/s]
Permutation test:  76%|███████▌  | 7587/10000 [00:49<00:17, 141.23 permutations/s]
Permutation test:  76%|███████▌  | 7602/10000 [00:49<00:16, 143.29 permutations/s]
Permutation test:  76%|███████▌  | 7617/10000 [00:49<00:16, 143.43 permutations/s]
Permutation test:  76%|███████▋  | 7632/10000 [00:49<00:16, 145.24 permutations/s]
Permutation test:  76%|███████▋  | 7647/10000 [00:49<00:16, 143.91 permutations/s]
Permutation test:  77%|███████▋  | 7662/10000 [00:50<00:16, 140.81 permutations/s]
Permutation test:  77%|███████▋  | 7677/10000 [00:50<00:16, 137.15 permutations/s]
Permutation test:  77%|███████▋  | 7691/10000 [00:50<00:16, 136.98 permutations/s]
Permutation test:  77%|███████▋  | 7705/10000 [00:50<00:17, 134.58 permutations/s]
Permutation test:  77%|███████▋  | 7720/10000 [00:50<00:16, 137.41 permutations/s]
Permutation test:  77%|███████▋  | 7734/10000 [00:50<00:16, 136.58 permutations/s]
Permutation test:  77%|███████▋  | 7748/10000 [00:50<00:16, 133.20 permutations/s]
Permutation test:  78%|███████▊  | 7762/10000 [00:50<00:17, 127.87 permutations/s]
Permutation test:  78%|███████▊  | 7777/10000 [00:50<00:16, 133.40 permutations/s]
Permutation test:  78%|███████▊  | 7792/10000 [00:51<00:16, 136.11 permutations/s]
Permutation test:  78%|███████▊  | 7806/10000 [00:51<00:16, 134.99 permutations/s]
Permutation test:  78%|███████▊  | 7820/10000 [00:51<00:16, 133.92 permutations/s]
Permutation test:  78%|███████▊  | 7834/10000 [00:51<00:16, 133.19 permutations/s]
Permutation test:  78%|███████▊  | 7848/10000 [00:51<00:16, 134.23 permutations/s]
Permutation test:  79%|███████▊  | 7864/10000 [00:51<00:15, 138.07 permutations/s]
Permutation test:  79%|███████▉  | 7878/10000 [00:51<00:15, 137.95 permutations/s]
Permutation test:  79%|███████▉  | 7892/10000 [00:51<00:15, 137.41 permutations/s]
Permutation test:  79%|███████▉  | 7907/10000 [00:51<00:14, 140.65 permutations/s]
Permutation test:  79%|███████▉  | 7922/10000 [00:52<00:15, 136.77 permutations/s]
Permutation test:  79%|███████▉  | 7936/10000 [00:52<00:15, 133.07 permutations/s]
Permutation test:  80%|███████▉  | 7950/10000 [00:52<00:15, 133.58 permutations/s]
Permutation test:  80%|███████▉  | 7964/10000 [00:52<00:15, 134.10 permutations/s]
Permutation test:  80%|███████▉  | 7978/10000 [00:52<00:15, 134.64 permutations/s]
Permutation test:  80%|███████▉  | 7992/10000 [00:52<00:15, 130.78 permutations/s]
Permutation test:  80%|████████  | 8006/10000 [00:52<00:15, 131.24 permutations/s]
Permutation test:  80%|████████  | 8020/10000 [00:52<00:15, 129.31 permutations/s]
Permutation test:  80%|████████  | 8035/10000 [00:52<00:14, 132.37 permutations/s]
Permutation test:  81%|████████  | 8051/10000 [00:52<00:13, 139.50 permutations/s]
Permutation test:  81%|████████  | 8065/10000 [00:53<00:13, 139.29 permutations/s]
Permutation test:  81%|████████  | 8080/10000 [00:53<00:13, 138.72 permutations/s]
Permutation test:  81%|████████  | 8094/10000 [00:53<00:13, 138.02 permutations/s]
Permutation test:  81%|████████  | 8108/10000 [00:53<00:14, 132.07 permutations/s]
Permutation test:  81%|████████  | 8122/10000 [00:53<00:14, 132.69 permutations/s]
Permutation test:  81%|████████▏ | 8138/10000 [00:53<00:13, 135.81 permutations/s]
Permutation test:  82%|████████▏ | 8153/10000 [00:53<00:13, 139.07 permutations/s]
Permutation test:  82%|████████▏ | 8167/10000 [00:53<00:13, 134.00 permutations/s]
Permutation test:  82%|████████▏ | 8181/10000 [00:53<00:13, 131.28 permutations/s]
Permutation test:  82%|████████▏ | 8197/10000 [00:54<00:13, 135.37 permutations/s]
Permutation test:  82%|████████▏ | 8211/10000 [00:54<00:13, 136.37 permutations/s]
Permutation test:  82%|████████▏ | 8225/10000 [00:54<00:13, 136.03 permutations/s]
Permutation test:  82%|████████▏ | 8239/10000 [00:54<00:13, 135.39 permutations/s]
Permutation test:  83%|████████▎ | 8253/10000 [00:54<00:13, 133.77 permutations/s]
Permutation test:  83%|████████▎ | 8268/10000 [00:54<00:12, 133.87 permutations/s]
Permutation test:  83%|████████▎ | 8283/10000 [00:54<00:12, 133.68 permutations/s]
Permutation test:  83%|████████▎ | 8298/10000 [00:54<00:12, 133.44 permutations/s]
Permutation test:  83%|████████▎ | 8314/10000 [00:54<00:12, 138.80 permutations/s]
Permutation test:  83%|████████▎ | 8328/10000 [00:55<00:12, 133.92 permutations/s]
Permutation test:  83%|████████▎ | 8342/10000 [00:55<00:12, 132.06 permutations/s]
Permutation test:  84%|████████▎ | 8356/10000 [00:55<00:12, 131.78 permutations/s]
Permutation test:  84%|████████▎ | 8370/10000 [00:55<00:12, 127.71 permutations/s]
Permutation test:  84%|████████▍ | 8386/10000 [00:55<00:11, 134.96 permutations/s]
Permutation test:  84%|████████▍ | 8401/10000 [00:55<00:11, 134.89 permutations/s]
Permutation test:  84%|████████▍ | 8415/10000 [00:55<00:11, 133.93 permutations/s]
Permutation test:  84%|████████▍ | 8429/10000 [00:55<00:11, 135.26 permutations/s]
Permutation test:  84%|████████▍ | 8444/10000 [00:55<00:11, 139.48 permutations/s]
Permutation test:  85%|████████▍ | 8458/10000 [00:55<00:11, 138.03 permutations/s]
Permutation test:  85%|████████▍ | 8474/10000 [00:56<00:10, 141.14 permutations/s]
Permutation test:  85%|████████▍ | 8489/10000 [00:56<00:10, 140.31 permutations/s]
Permutation test:  85%|████████▌ | 8504/10000 [00:56<00:11, 134.72 permutations/s]
Permutation test:  85%|████████▌ | 8518/10000 [00:56<00:11, 131.52 permutations/s]
Permutation test:  85%|████████▌ | 8532/10000 [00:56<00:11, 132.16 permutations/s]
Permutation test:  85%|████████▌ | 8546/10000 [00:56<00:10, 134.06 permutations/s]
Permutation test:  86%|████████▌ | 8560/10000 [00:56<00:10, 131.55 permutations/s]
Permutation test:  86%|████████▌ | 8574/10000 [00:56<00:10, 129.90 permutations/s]
Permutation test:  86%|████████▌ | 8590/10000 [00:56<00:10, 134.94 permutations/s]
Permutation test:  86%|████████▌ | 8606/10000 [00:57<00:09, 140.22 permutations/s]
Permutation test:  86%|████████▌ | 8621/10000 [00:57<00:09, 140.20 permutations/s]
Permutation test:  86%|████████▋ | 8636/10000 [00:57<00:09, 136.68 permutations/s]
Permutation test:  87%|████████▋ | 8651/10000 [00:57<00:09, 136.95 permutations/s]
Permutation test:  87%|████████▋ | 8668/10000 [00:57<00:09, 145.48 permutations/s]
Permutation test:  87%|████████▋ | 8683/10000 [00:57<00:09, 144.57 permutations/s]
Permutation test:  87%|████████▋ | 8698/10000 [00:57<00:09, 138.73 permutations/s]
Permutation test:  87%|████████▋ | 8712/10000 [00:57<00:09, 136.60 permutations/s]
Permutation test:  87%|████████▋ | 8726/10000 [00:57<00:09, 135.75 permutations/s]
Permutation test:  87%|████████▋ | 8740/10000 [00:58<00:09, 134.27 permutations/s]
Permutation test:  88%|████████▊ | 8754/10000 [00:58<00:09, 131.37 permutations/s]
Permutation test:  88%|████████▊ | 8768/10000 [00:58<00:09, 130.10 permutations/s]
Permutation test:  88%|████████▊ | 8782/10000 [00:58<00:09, 130.01 permutations/s]
Permutation test:  88%|████████▊ | 8799/10000 [00:58<00:08, 141.06 permutations/s]
Permutation test:  88%|████████▊ | 8814/10000 [00:58<00:08, 134.82 permutations/s]
Permutation test:  88%|████████▊ | 8828/10000 [00:58<00:08, 132.42 permutations/s]
Permutation test:  88%|████████▊ | 8842/10000 [00:58<00:08, 134.53 permutations/s]
Permutation test:  89%|████████▊ | 8857/10000 [00:58<00:08, 135.74 permutations/s]
Permutation test:  89%|████████▊ | 8872/10000 [00:59<00:08, 138.65 permutations/s]
Permutation test:  89%|████████▉ | 8886/10000 [00:59<00:08, 134.83 permutations/s]
Permutation test:  89%|████████▉ | 8902/10000 [00:59<00:07, 138.13 permutations/s]
Permutation test:  89%|████████▉ | 8918/10000 [00:59<00:07, 141.90 permutations/s]
Permutation test:  89%|████████▉ | 8933/10000 [00:59<00:07, 144.00 permutations/s]
Permutation test:  89%|████████▉ | 8948/10000 [00:59<00:07, 141.08 permutations/s]
Permutation test:  90%|████████▉ | 8963/10000 [00:59<00:07, 137.32 permutations/s]
Permutation test:  90%|████████▉ | 8977/10000 [00:59<00:07, 137.64 permutations/s]
Permutation test:  90%|████████▉ | 8992/10000 [00:59<00:07, 137.14 permutations/s]
Permutation test:  90%|█████████ | 9006/10000 [01:00<00:07, 137.82 permutations/s]
Permutation test:  90%|█████████ | 9020/10000 [01:00<00:07, 138.39 permutations/s]
Permutation test:  90%|█████████ | 9034/10000 [01:00<00:07, 136.44 permutations/s]
Permutation test:  90%|█████████ | 9049/10000 [01:00<00:06, 138.26 permutations/s]
Permutation test:  91%|█████████ | 9063/10000 [01:00<00:06, 137.19 permutations/s]
Permutation test:  91%|█████████ | 9079/10000 [01:00<00:06, 141.66 permutations/s]
Permutation test:  91%|█████████ | 9094/10000 [01:00<00:06, 143.15 permutations/s]
Permutation test:  91%|█████████ | 9109/10000 [01:00<00:06, 141.74 permutations/s]
Permutation test:  91%|█████████ | 9124/10000 [01:00<00:06, 138.53 permutations/s]
Permutation test:  91%|█████████▏| 9139/10000 [01:00<00:06, 139.68 permutations/s]
Permutation test:  92%|█████████▏| 9153/10000 [01:01<00:06, 138.65 permutations/s]
Permutation test:  92%|█████████▏| 9167/10000 [01:01<00:06, 138.57 permutations/s]
Permutation test:  92%|█████████▏| 9183/10000 [01:01<00:05, 138.97 permutations/s]
Permutation test:  92%|█████████▏| 9197/10000 [01:01<00:05, 138.75 permutations/s]
Permutation test:  92%|█████████▏| 9211/10000 [01:01<00:05, 134.42 permutations/s]
Permutation test:  92%|█████████▏| 9226/10000 [01:01<00:05, 137.88 permutations/s]
Permutation test:  92%|█████████▏| 9240/10000 [01:01<00:05, 137.17 permutations/s]
Permutation test:  93%|█████████▎| 9255/10000 [01:01<00:05, 140.46 permutations/s]
Permutation test:  93%|█████████▎| 9270/10000 [01:01<00:05, 136.72 permutations/s]
Permutation test:  93%|█████████▎| 9284/10000 [01:02<00:05, 137.55 permutations/s]
Permutation test:  93%|█████████▎| 9299/10000 [01:02<00:05, 138.22 permutations/s]
Permutation test:  93%|█████████▎| 9313/10000 [01:02<00:04, 138.60 permutations/s]
Permutation test:  93%|█████████▎| 9327/10000 [01:02<00:04, 134.72 permutations/s]
Permutation test:  93%|█████████▎| 9341/10000 [01:02<00:04, 136.08 permutations/s]
Permutation test:  94%|█████████▎| 9356/10000 [01:02<00:04, 138.64 permutations/s]
Permutation test:  94%|█████████▎| 9373/10000 [01:02<00:04, 143.73 permutations/s]
Permutation test:  94%|█████████▍| 9388/10000 [01:02<00:04, 144.70 permutations/s]
Permutation test:  94%|█████████▍| 9404/10000 [01:02<00:04, 148.23 permutations/s]
Permutation test:  94%|█████████▍| 9419/10000 [01:02<00:03, 145.80 permutations/s]
Permutation test:  94%|█████████▍| 9434/10000 [01:03<00:03, 143.11 permutations/s]
Permutation test:  94%|█████████▍| 9449/10000 [01:03<00:03, 143.17 permutations/s]
Permutation test:  95%|█████████▍| 9464/10000 [01:03<00:03, 141.79 permutations/s]
Permutation test:  95%|█████████▍| 9479/10000 [01:03<00:03, 142.65 permutations/s]
Permutation test:  95%|█████████▍| 9496/10000 [01:03<00:03, 145.50 permutations/s]
Permutation test:  95%|█████████▌| 9512/10000 [01:03<00:03, 147.54 permutations/s]
Permutation test:  95%|█████████▌| 9527/10000 [01:03<00:03, 143.30 permutations/s]
Permutation test:  95%|█████████▌| 9542/10000 [01:03<00:03, 142.59 permutations/s]
Permutation test:  96%|█████████▌| 9560/10000 [01:03<00:02, 153.13 permutations/s]
Permutation test:  96%|█████████▌| 9581/10000 [01:04<00:02, 166.55 permutations/s]
Permutation test:  96%|█████████▌| 9601/10000 [01:04<00:02, 171.80 permutations/s]
Permutation test:  96%|█████████▌| 9620/10000 [01:04<00:02, 175.29 permutations/s]
Permutation test:  96%|█████████▋| 9641/10000 [01:04<00:01, 184.90 permutations/s]
Permutation test:  97%|█████████▋| 9662/10000 [01:04<00:01, 185.69 permutations/s]
Permutation test:  97%|█████████▋| 9682/10000 [01:04<00:01, 189.34 permutations/s]
Permutation test:  97%|█████████▋| 9701/10000 [01:04<00:01, 180.88 permutations/s]
Permutation test:  97%|█████████▋| 9720/10000 [01:04<00:01, 173.89 permutations/s]
Permutation test:  97%|█████████▋| 9738/10000 [01:04<00:01, 159.53 permutations/s]
Permutation test:  98%|█████████▊| 9758/10000 [01:05<00:01, 165.33 permutations/s]
Permutation test:  98%|█████████▊| 9779/10000 [01:05<00:01, 177.26 permutations/s]
Permutation test:  98%|█████████▊| 9798/10000 [01:05<00:01, 179.05 permutations/s]
Permutation test:  98%|█████████▊| 9817/10000 [01:05<00:01, 180.99 permutations/s]
Permutation test:  98%|█████████▊| 9837/10000 [01:05<00:00, 183.48 permutations/s]
Permutation test:  99%|█████████▊| 9859/10000 [01:05<00:00, 189.92 permutations/s]
Permutation test:  99%|█████████▉| 9879/10000 [01:05<00:00, 190.03 permutations/s]
Permutation test:  99%|█████████▉| 9899/10000 [01:05<00:00, 181.06 permutations/s]
Permutation test:  99%|█████████▉| 9918/10000 [01:05<00:00, 180.30 permutations/s]
Permutation test:  99%|█████████▉| 9940/10000 [01:05<00:00, 191.37 permutations/s]
Permutation test: 100%|█████████▉| 9960/10000 [01:06<00:00, 189.74 permutations/s]
Permutation test: 100%|█████████▉| 9980/10000 [01:06<00:00, 191.11 permutations/s]
Permutation test: 100%|██████████| 10000/10000 [01:06<00:00, 192.21 permutations/s]
Permutation test: 100%|██████████| 10000/10000 [01:06<00:00, 150.83 permutations/s]

A quick plot suggests an early effect related to n_chars around 130 ms, and a later effect of cloze around 400 ms:

p = plot.TopoButterfly(lm, t=0.130, axh=2, w=6)
sensor lm

Detailed plots of the two effects show that the cluster is quite variable due to noise in the data.

p = plot.TopoArray(lm.masked_parameter_map('n_chars'), t=[0.110, 0.130, 0.150], title='N Chars')
p = plot.TopoArray(lm.masked_parameter_map('cloze'), t=[0.380, 0.400, 0.420], title='Cloze')
  • N Chars
  • Cloze

To access some of the test results we need to know the index of different effects:

('intercept', 'n_chars', 'cloze')

Create a plot that shows the spatial cluster extent across time.

EFFECTS = [
    ('n_chars', (0.110, 0.150)),
    ('cloze', (0.380, 0.420)),
]

t_maps = []
for effect, time in EFFECTS:
    # t-maps are retrieved by effect name
    t = lm.t(effect).mean(time=time)
    # p-maps are stored in a list, so we need to know the index of te effect
    index = lm.effects.index(effect)
    # We are interested in the maximal spatial cluster extent, i.e., any sensor that is part of the cluster at any time
    p = lm.p[index].min(time=time)
    # Create a masked average t map
    t_av = t.mask(p > 0.05)
    t_maps.append(t_av)

p = plot.Topomap(t_maps, columns=2)
n_chars, cloze

Total running time of the script: (1 minutes 9.584 seconds)

Gallery generated by Sphinx-Gallery