Home

Menu

Loading wiki pages...

View
Wiki Version:
<p>Two MATLAB functions are provided for estimating the sample size through simulations for the cluster-based permutation test used in EEG/MEG data. They can be used for <strong>t-test</strong> between two conditions, <strong>one-way ANOVA</strong> with three or more conditions, or <strong>2×N interactions</strong>.</p> <p><strong>Cite as</strong>: <a href="https://doi.org/10.1111/psyp.13775" rel="nofollow">Wang, & Zhang. (2021). Word frequency effect in written production: Evidence from ERPs and neural oscillations. Psychophysiology, 58: e13775</a>. </p> <p><strong>Please cite the above paper</strong> if you use these functions, which were written for, and first used in this paper.</p> <p>MATLAB functions are stored in the <em>functions</em> file. - <strong>sampleSize_erp</strong> is for ERP analysis - <strong>sampleSize_timefreq</strong> is for time frequency analysis</p> <p>The following two demo files demonstrate how to use the above two functions: - <strong>demo_erp.m</strong> - <strong>demo_timefreq.m</strong></p> <p>Take a simple design with two conditions for example, what the functions do is simulating a dataset with two conditions of ERP (2 dimensions: channel×time) or time-frequency (3 dimensions: channel×frequency×time) data, for each sample size (starting from 10, increasing in steps of 1 until reaching a power of 0.80). In each sample of the ERP/time-frequency data, we simulate a cluster of interest within a predefined time window (eg, 50-250 ms) and frequency band (eg, 4-8 Hz) in neighboring channels (eg, C1, CZ, CP1, CPZ). The size of the cluster can be chosen to be similar to that of the cluster displaying effect of interest in prior existing or pilot studies. The cluster's peak values in the two conditions were sampled from two normal distributions (for a between-subject design) or a bivariate normal distribution (for a within-subject design). The means and standard deviations of the distributions can be chosen to be similar to those in prior existing or pilot studies. Then a cluster-based permutation test is performed on the simulated dataset to test whether any cluster exhibited significant difference between the two conditions with an alpha level of 0.05. For each sample size, the simulation was run for 1000 times, and the power was calculated as the proportion of the number of times finding significant clusters in these 1000 simulations. </p> <p>I also provided a detailed introduction to this method in the <a href="https://www.fieldtriptoolbox.org/example/samplesize/" rel="nofollow"> Fieldtrip website</a>. </p>
OSF does not support the use of Internet Explorer. For optimal performance, please switch to another browser.
Accept
This website relies on cookies to help provide a better user experience. By clicking Accept or continuing to use the site, you agree. For more information, see our Privacy Policy and information on cookie use.
Accept
×

Start managing your projects on the OSF today.

Free and easy to use, the Open Science Framework supports the entire research lifecycle: planning, execution, reporting, archiving, and discovery.