Fitting mean-shift models with covariates