I would try and fix the problem with training first, not spaying. Depending on the state of the dog, spaying may actually increase her aggression.
Various studies of the effects neutering has overall on male and female dog aggression have been unable to arrive at a consensus. A possible reason for this according to one study is changes to other factors have more of an effect than neutering. One study reported results of aggression towards familiar and strange people and other dogs reduced between 10 and 60 percent of cases, while other studies reported increases in possessive aggression and aggression towards familiar and strange people, and yet another study reported no effect on territorial aggression, and only a reduction in dominance aggression that existed for at least 5 years. For females with existing aggression, many studies reported increases in aggressive behavior and some found increased separation anxiety behavior. A report from the American Kennel Club Canine Health Foundation reported significantly more behavioral problems in castrated dogs. The most commonly observed behavioral problem in spayed females was fearful behavior and the most common problem in males was aggression. Early age gonadectomy is associated with an increased incidence of noise phobias and undesirable sexual behaviors.
Another relevant article.
For Females the Effects May be Different
The study results for male dogs and cats make the course of action clear. But for female dogs, the findings on the effects of spaying on behavior were unexpected.
According to Katherine Houpt, VMD, PhD, DACVB, director of the Animal Behavior Clinic at Cornell University Hospital for Animals, spaying may actually contribute to behavioral problems. In a cooperative study with the Institute of Animal Medicine at Gyeongsang National University in Korea, Houpt and her colleagues found that ovariohysterectomy (spay) in healthy German Shepherds bred as working dogs led to increased reactivity.
In the study, 14 healthy German Shepherd bitches at the Korean Air Force Dog Training Center were studied. Half of the study dogs were spayed at 5 to 10 months of age, and the other half were intact. The dogs were littermates and were split equally into both groups to control for genetics. The dogs all lived in the same kennel environment and received similar handling. Their behavioral reactions were tested at 4 and 5 months after surgery.
Each dog was tested separately in its outdoor kennel while the rest of the dogs remained indoors. An unfamiliar human with an unknown dog walked within 1 meter of the target dog's kennel, and the kenneled German Shepherd's response was recorded.
In each of four different recordings for each dog, researchers recorded
barking or growling
lips lifting or curling.
Dogs were scored as follows
Score of 3 if they exhibited all 10 behaviors
Score of 2 if they exhibited 7 of 10 behaviors
Score of 1 if they exhibited 5 of 10 behaviors
Score of 0 if they exhibited less than 4 of the behaviors
"Ideally we would have scored the dogs before they were spayed, too," says Houpt. "Regardless, the results were dramatic. Dogs that had been spayed were significantly more reactive, with most receiving scores of 2 and 3, whereas the unspayed littermates received reactivity scores of 1."
These scores decreased in two of the seven experimental dogs on repeat testing, but by the final testing phase, five of the seven dogs still received a score of 2 or higher.
Houpt emphasizes that military dogs would be expected to exhibit more aggressive behaviors and such behavior on command may be desirable. These dogs would not, however, be appropriate as pet or guide dogs or for pet therapy.