Resampling with MATLAB
Professor Frank Schieber, Heimstra Human Factors Laboratories, University of South Dakota


Tutorial Book Chapter
Moore, D.S.G., McCabe, W., Duckworth, W. and Sclove, S. (2003).  Bootstrap methods and permutation tests. In D. Moore (Ed.), Practice of Business Statistics. San Fancisco: W.H. Freeman Publishers. http://bcs.whfreeman.com/pbs/cat_140/chap18.pdf

Heimstra Labs Colloquium [Powerpoint Presentation]

MATLAB Scripts for Implementing Examples from Moore, et al. (2003)

M-File

Data File

Description
h2.m eg18_002.txt  Example 18.2 - Bootstrapping the sample mean and Std. Error
h7.m ca18_001.txt  Example 18.7 - Bootstrapping Difference between Sample Means
h10.m eg18_010.txt  Example 18.10 - Bootstrapping the Correlation Coefficient
h12.m ta18_004.txt  Example 18.12 - Permutation Test: Treatment vs. Control Group
h14.m eg18_014.txt  Example 18.14 - Permutation Test under Extreme Conditions
h15.m inline  Example - Permutation Test Equivalent of Correlated t-Test
  PBSdata.zip  ZIP archive of all data files from Moore, et al. (2003) text

Note:  All of the MATLAB scripts included above expect to find the data in a subdirectory named 'data'.
Some scripts use the STATISTICS TOOLBOX to conduct equivalent t-tests.  If you do not have this toolbox you will need to 'comment out' the offending code.

MATLAB Functions for Implementing Random Samples and Permutation Samples
(You will need to download these scripts to run the simulations listed above)

M-File

Description
randsample  Generate sample from specified population (with or w/o replacement)
randperm2  Generate two Permutation Samples from specified population
randomize_matrix  Shuffle the order of elements in an array (quick 'n dirty)

Useful Links
Resampling: The New Statistics (Book by J.L.Simon, 1997)
Lawrence Cormack's "Do-it-yourself Statistics" course at UTexas
 

Last modified: 28 January 2013
Heimstra Labs Colloquium Series


USD Home Page - Professor Schieber's Home Page - Previous Page