A method for analyzing the genetic basis of covariation