Please see
http://statistics.byu.edu/johnson/ComBat/