Hi XXXXXXXXXXX~
As I'm sure you're well aware of, any time a dog bites a person IT IS SERIOUS. You must get your dog under control immediately before she either does serious damage to someone, or is euthanized for being a dangerous dog.
However, the first thing you need to do is rule out any physical causes of aggression. Hormonal imbalances, especially of the thyroid, can lead to this type of aggression. You should have your dog's thyroid function tested, and ask your vet about any other tests she/he feels may be important for a situation like this. If no physical cause is found, you'll need to make some decisions on how your'e going to handle this aggression. You should never punish or yell at the dog for this behavior. Yelling only causes the excitement level to rise. Punishment reinforces the idea that the dog does have something to fear or be anxious about. To change the behavior, a serious and consistent behavior modification program would need to be used. I recommend that you consult a professional dog behaviorist to work with you on this.
Personally, it sounds to me as if you have a fearful/unsocialized dog who bites when she is faced with new situations that she doesn't know how to deal with. Unfortunately, this is one of the toughest behavioral problems to work out, but with a great deal of patience and understanding, and most importantly consistency, you can get her to break these bad habits.
German Shepherds are loving, playful, fun dogs. They are lively and courageous. They are very strong willed, and can be stubborn making training them a challenge from time to time. They are extremely loyal to their owners and that is probably part of what you are seeing here. To your dog when people come over, all of a sudden there are strangers that have invaded her territory and she is not sure at this point whether they pose a threat to her family thus her waffling between putting on an aggressive stance which is possibly out of fear and allowing them to pet her. Your dog is still relatively young, and I feel she needs a lot more socialization or you may end up with a dog that is a problem to visitors and may end up a problem for you if she decides to bite someone else. While a quick fix isn't available, until you can resocialize her, you can let your girl trail a leash and give her a quick correction (a tug at the leash quickly and hard) and firm "NO" if she shows aggression toward any person who may or may not be on your property.
They are quick learners so hopefully she'll learn quickly that this behavior is not acceptable. I also think you will need to enroll her in an obedience class not only for training but also for the socialization that occurs at classes. You may also take her to pet stores that allow doggie visitors and to other public places so she gets used to as many different kinds of people as possible and will not see them as a threat. You will also want to have more visitors to you home so she knows that visitors that you let in are OK. When you invite people over, instruct them to not make eye contact, speak to or pet your dog until she is calm and not behaving in an aggressive fashion. Once she has calmed down, they can give her treats, but only if she comes to them and sits for it. It can be hard work to socialize a dog, but the rewards are worth it as is avoiding the potential problems associated with an unsocialized dog.
I do understand that finances are an issue, but there are organizations that might be able to help. If you'll follow this link:
http://www.speakingforspot.com/helppayingforveterinarycare.html , you'll find dozens and dozens of groups that might be able to help fund your trip to the vet, and then posibly can help you pay for a trainer, or put you in touch with a trainer who can help at a discounted price.
I hope this helps.
Certified Veterinary Technician
Associates Degree in Veterinary Technology. State and Nationally certified.