Sticking to a diet is essential to losing weight. So it might follow that letting would-be dieters choose a weight-loss program that seems relatively tasty and palatable would help them lose weight.

But when a group of researchers recently tested that, they found the opposite was true: Obese clinic patients at a Veterans Affairs medical center in North Carolina who were allowed to choose a diet plan lost less weight than obese patients who were assigned a diet to follow.

“Providing a choice of diets to patients does not enhance and may actually hinder weight loss,” wrote Dr. William S. Yancy of Duke University and the Durham Veterans Affairs Medical Center and co-authors in a study released Monday in the Annals of Internal Medicine.

The team recruited 207 participants for its study from May 2011 and June 2012 from clinics affiliated with the VA hospital.

Of the subjects, 105 were assigned to a so-called choice group and were allowed to pick whether they wanted to follow a low-carbohydrate diet or a low-fat diet.

The remaining 102 were assigned to a “comparator” group that was assigned to one of the two diet plans by the study organizers.

Both groups received group and telephone counseling over the course of the 48-week study; people in the choice group additionally were allowed to switch their diets at the 12-week mark if they were unhappy with their first pick. Only five made the change.

After 48 weeks, members of the choice group had lost about 12.6 pounds (or 5.6 percent of body weight) on average, while members of the comparator group had lost about 14.7 pounds (6.2 percent of body weight) on average.

The researchers speculated that people who chose a diet that included more foods they liked may have been more likely to overeat, or that dieters might have experienced something like a “personal trainer effect,” in which they were more likely to follow the regimen if someone else directed them to do so.