My aunt has lived in Brooklyn for decades and never been mugged. She attributes it to her attitude. I'm not sure exactly what her method is, but for years I've tried to copy it. When I transitioned from the suburbs to the city, I decided that this meant not interacting with strange men.