(CNN) The modern vaccine for whooping cough becomes less effective as children age, a new study shows, highlighting the need for new vaccines to protect children from the highly contagious disease.

Infants and children are supposed to receive five doses of the DTaP vaccine before age 7. Four vaccines are administered before 18 months, and another is given when a child is 4 to 6 years old. A similar booster shot is given when a child is 11 or 12 years old.

But the new research, published Monday in the journal Pediatrics, found that the risk of contracting whooping cough increased as children were further away from their last shot of the vaccine, suggesting that immunity wanes as time passes between doses.

Take, for example, a 5-year-old child who hasn't yet gotten their fifth dose. That child, who received their last shot more than three years ago, would be five times more likely to contract whooping cough than one who just received a dose within the past year, the study found.

The DTaP vaccine, which also protects against diphtheria and tetanus, was still found to be effective: The risk of coming down with whooping cough was 13 times higher in those who were unvaccinated, and almost twice as high in those who received some, but not all, of their shots.