A study examined the habits of more than 6,000 people.