Young doctors in training, especially men, are increasingly concerned about the risk and difficulty of treating AIDS patients.

According to a study of 250 medical and pediatric residents at two New York hospitals, one-quarter said they would not continue treating AIDS patients if given a choice and about one-third said they should have some say in whether they care for such patients.

Another study, of 56 young doctors at San Francisco General Hospital, found that 69 percent -- 84 percent of the men and 48 percent of the women -- agreed that they are at risk of getting acquired immune deficiency syndrome even if they have no risk factors other than treating patients with the disease.

Thirty percent of the male doctors and 4 percent of the female doctors in the San Francisco study had had bad dreams or nightmares about AIDS.

Researchers offered three possible reasons for the difference in attitudes between male and female doctors. Male heterosexual doctors might be more uneasy with the homosexuality of many AIDS patients, and they might find themselves confronting their own mortality in treating dying patients their own age. Also, women in medicine have traditionally been more comfortable than men with the palliative care of terminally ill patients.

In the New York study, 36 percent of the medical residents and 17 percent of the pediatric residents reported having stuck themselves accidentally with needles possibly contaminated with the AIDS virus.

Both studies were reported at the Third International Conference on AIDS this week.