Detroit named worst city to live in, study finds