Houston ranks among the most dangerous cities in the country for trick-or-treating, according to a new study that examined crime rates, pedestrian fatalities and other safety factors ahead of Halloween.

The annual analysis by SafeHome.org evaluated 152 U.S. cities, comparing factors including violent and property crime, registered sex offenders, pedestrian fatalities and the number of law enforcement officers.

Houston ranked No. 16 among the most dangerous cities for trick-or-treating, down from No. 15 in last year's study.