Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
development:cluster_permutation_timelock [2017/08/17 12:31]
127.0.0.1 external edit
development:cluster_permutation_timelock [2017/09/13 03:43] (current)
137.99.170.171
Line 105: Line 105:
   * **cfg.neighbours** is a structure that you need to have previously created using [[reference:​ft_neighbourselection|ft_neighbourselection]].   * **cfg.neighbours** is a structure that you need to have previously created using [[reference:​ft_neighbourselection|ft_neighbourselection]].
   * We use **cfg.tail** to choose between a one-sided and a two-sided statistical test. Choosing cfg.tail = 0 affects the calculations in three ways. First, the sample-specific T-values are thresholded from below as well as from above. This implies that both large negative and large positive T-statistics are selected for later clustering. Second, clustering is performed separately for thresholded positive and thresholded negative T-statistics. And third, the critical value for the cluster-level test statistic (determined by cfg.alpha; see further) is now two-sided: negative cluster-level statistics must be compared with the negative critical value, and positive cluster-level statistics must be compared with the positive critical value.   * We use **cfg.tail** to choose between a one-sided and a two-sided statistical test. Choosing cfg.tail = 0 affects the calculations in three ways. First, the sample-specific T-values are thresholded from below as well as from above. This implies that both large negative and large positive T-statistics are selected for later clustering. Second, clustering is performed separately for thresholded positive and thresholded negative T-statistics. And third, the critical value for the cluster-level test statistic (determined by cfg.alpha; see further) is now two-sided: negative cluster-level statistics must be compared with the negative critical value, and positive cluster-level statistics must be compared with the positive critical value.
-  * We use **cfg.alpha** to control the false alarm rate of the permutation test (the probability of falsely rejecting the null hypothesis). The value of cfg.alpha determines the critical values with which we must compare the test statistic (i.e., the maximum and the minimum cluster-level statistic). //Note that if you want to run a two-sided test, you have to split the critical alpha value by setting cfg.correcttail = '​alpha';​ i.e. this sets cfg.alpha = 0.025, corresponding to a false alarm rate of 0.05 in a two-sided test.// The field cfg.alpha is not crucial. This is because the output of **[[reference:​ft_timelockstatistics|ft_timelockstatistics]]** (see further) contains a p-value for every cluster (calculated under the permutation distribution of the maximum/​minimum cluster-level statistic). Instead of the critical values, we can also use these p-values to determine the significance of the clusters.+  * We use **cfg.alpha** to control the false alarm rate of the permutation test (the probability of falsely rejecting the null hypothesis). The value of cfg.alpha determines the critical values with which we must compare the test statistic (i.e., the maximum and the minimum cluster-level statistic). //Note that if you want to run a two-sided test, you have to split the critical alpha value by setting cfg.correcttail = '​alpha';​ i.e. this sets cfg.alpha = 0.025, corresponding to a false alarm rate of 0.05 in a two-sided test.// The field cfg.alpha is not crucial. This is because the output of **[[reference:​ft_timelockstatistics|ft_timelockstatistics]]** (see further) contains a p-value for every cluster (calculated under the permutation distribution of the maximum/​minimum cluster-level statistic). Instead of the critical values, we can also use these p-values to determine the significance of the clusters. Using cfg.correcttail = '​alpha'​ only changes the threshold for stat.mask, while values in stat.posclusters.prob or stat.negclusters.prob remain unchanged. However, if you are using cfg.correcttail = '​prob',​ p values in stat.pos/​negclusters.prob are multiplied by 2 before thresholding for stat.mask.
   * We use **cfg.numrandomization** to control the number of draws from the permutation distribution. Remember that **[[reference:​ft_timelockstatistics|ft_timelockstatistics]]** approximates the permutation distribution by means of a histogram. This histogram is a so-called Monte Carlo approximation of the permutation distribution. This Monte Carlo approximation is used to calculate the p-values and the critical values that are shown in the output of **[[reference:​ft_timelockstatistics|ft_timelockstatistics]]**. In this tutorial, we use cfg.numrandomization = 100. This number is too small for actual applications. As a rule of thumb, use cfg.numrandomization = 500, and double this number if it turns out that the p-value differs from the critical alpha-level (0.05 or 0.01) by less than 0.02.   * We use **cfg.numrandomization** to control the number of draws from the permutation distribution. Remember that **[[reference:​ft_timelockstatistics|ft_timelockstatistics]]** approximates the permutation distribution by means of a histogram. This histogram is a so-called Monte Carlo approximation of the permutation distribution. This Monte Carlo approximation is used to calculate the p-values and the critical values that are shown in the output of **[[reference:​ft_timelockstatistics|ft_timelockstatistics]]**. In this tutorial, we use cfg.numrandomization = 100. This number is too small for actual applications. As a rule of thumb, use cfg.numrandomization = 500, and double this number if it turns out that the p-value differs from the critical alpha-level (0.05 or 0.01) by less than 0.02.
   * We use **cfg.design** to store information about the UOs. The content of cfg.design must be a matrix. Consider the hypothetical case that your subject has performed 5 trials in the first condition and 4 trials in the second condition. Then the correct design matrix looks like this: cfg.design = [1 1 1 1 1 2 2 2 2].   * We use **cfg.design** to store information about the UOs. The content of cfg.design must be a matrix. Consider the hypothetical case that your subject has performed 5 trials in the first condition and 4 trials in the second condition. Then the correct design matrix looks like this: cfg.design = [1 1 1 1 1 2 2 2 2].