Code covered by the BSD License  

Highlights from
one sample/paired samples permutation t-test with correction for multiple comparisons


4.5 | 2 ratings Rate this file 45 Downloads (last 30 days) File Size: 5.18 KB File ID: #29782

one sample/paired samples permutation t-test with correction for multiple comparisons



19 Dec 2010 (Updated )

One sample/paired samples permutation t-test with correction for multiple comparisons

| Watch this File

File Information

     Permutation test of the null hypothesis that a set of data was sampled from a symmetric distribution with a particular mean. The test is based on a t-statistic and can be applied to situations in which a one sample or paired sample/repeated measures t-test is appropriate. Note, that this test is more general than parametric t-tests in that it does not assume that the data were sampled from a Gaussian distribution.
     This function can perform the test on one variable or simultaneously on multiple variables. When applying the test to multiple variables, the "tmax" method is used for adjusting the p-values of each variable for multiple comparisons (Blair & Karniski, 1993). Like Bonferroni correction, this method adjusts p-values in a way that controls the family-wise error rate. However, the permutation method will be more powerful than Bonferroni correction when different variables in the test are correlated.

Blair, R.C. & Karniski, W. (1993) An alternative method for significance testing of waveform difference potentials. Psychophysiology.

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
15 Apr 2014 Joana Paiva


I would like to know if anyone knows if it possible to perform a repeated measures ANOVA (more than 2 conditions per subject) using your function 'mult_comp_perm_t1' and how I can do that. In the function's description it says that:

Paired-Sample/Repated Measures Example:
% >> dataA=randn(16,5); %data from Condition A (5 variables, 16 observations)
% >> dataA(:,1:2)=dataA(:,1:2)+1; %mean of first two variables is 1
% >> dataB=randn(16,5); %data from Condition B (all variables have mean of 0)
% >> dif=dataA-dataB; %difference between conditions
% >> [pval, t_orig, crit_t, est_alpha, seed_state]=mult_comp_perm_t1(dif,50000);
% >> disp(pval); %adjusted p-values

But it refers to Repeated Measures ANOVA? The example only considers two conditions... for computing more than that, can I taking the differences among them (cond1-cond2-cond3-cond4)?

Thank you,

09 May 2013 Cecile

I have a question. If est_alpha value is 0 (I have 12 observations). the p-value is still correct (in my case p=0)? Should I use and other test ? change a parameter?
Thanks a lot.

09 May 2013 Cecile

very nice..Thanks

22 Apr 2011 Jiachen Zhuo

Nice program. Thank you.

03 Feb 2011

Karniski reference was misspelled as "Karnisky" and has been fixed. 'alpha_level' input option and 'crit_t' and 'est_alpha' output options added.

17 Sep 2012

Comments updated.

Contact us