Wait times for an appointment at Veterans Affairs hospitals have decreased since 2014 and are now, on average, shorter than those in the private sector, a new study shows.

Researchers used V.A. data to calculate wait times for about 17 million appointments. The public sector data came from a survey conducted by a physicians’ search firm in nearly 2,000 medical offices in 30 major and midsize metropolitan areas.

The study, in JAMA Network Open, covered four specialties: primary care, cardiology, dermatology and orthopedics.

In 2014 the average wait time in V.A. hospitals was 22.5 days, compared with 18.7 in the private sector, a statistically insignificant difference. But by 2017, mean wait time at V.A. hospitals had gone down to 17.7 days, while rising to 29.8 for private practitioners.