[FieldTrip] Query regarding stat.prob and permutation tests

Schoffelen, J.M. (Jan Mathijs) janmathijs.schoffelen at donders.ru.nl
Wed Aug 6 11:58:05 CEST 2025


Hi Cihan,

cfg.computeprob is an option that is used by (some of) the ’statfuns’, to convert a test-statistic with a known shape into a p-value, based on the shape of the parameter, (e.g. a T or F statistic).

The computational algorithm with which the p-value is computed (+returned in the output of a high level function call to ft_timelock/freq/sourcestatistics) depends on a combination of the contents of cfg.method (indeed if you would use cfg.method=‘montecarlo’, then the returned p-values are based on a permutation test, if you would  use cfg.method=‘analytic’ the p-values will be based on the known distributions), and cfg.correctm.

I  hope that this helps,

best wishes,
Jan-Mathijs


On 31 Jul 2025, at 17:03, cxd425--- via fieldtrip <fieldtrip at science.ru.nl> wrote:

Hi FieldTrip community,

I hope you’re doing well.

I was just curious how the p-values are computed at the first level - I couldn’t find any documentation explaining the behaviour of stat.prob when cfg.computeprob is set to true or false. When I set computeprob = false, the resulting stat object still contains p-values. Could it be that when cfg.computeprob = true, the p-values at the first level are computed using a permutation test, whereas when it’s set to false, a simpler non-permutation statistical test (e.g., a two-sample t-test) is used instead?

Any clarification would be greatly appreciated.

Best regards,
Cihan

_______________________________________________
fieldtrip mailing list
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C5f1e96736411424f428508ddd4cfbd46%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638900710874951780%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=%2Ff0eVqQZvDKZnSvgjrWXe1jm%2BQTno2avJyNHM4vVMzA%3D&reserved=0>
https://doi.org/10.1371/journal.pcbi.1002202<https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdoi.org%2F10.1371%2Fjournal.pcbi.1002202&data=05%7C02%7Cfieldtrip%40science.ru.nl%7C5f1e96736411424f428508ddd4cfbd46%7C084578d9400d4a5aa7c7e76ca47af400%7C1%7C0%7C638900710874985061%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=KsGS2lhF8zSK9kIRI22VAsBiXrrjqYbPIYrVVEAXVKg%3D&reserved=0>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20250806/c1591972/attachment.htm>


More information about the fieldtrip mailing list