Statistical Analysis of Haplotypes with Traits and Covariates