Many people are unconsciously rewarding their dogs for undesired behaviors when they pet their dog at the wrong time. When you pet your dog: you are rewarding her for whatever she is doing at that moment and you are rewarding whatever state of mind she is in at that moment. If your dog is excited when guests come over and you allow them to pet your dog, your dog is being rewarded for excitement. In other words, you are training your dog to be excited whenever guests come over. If your dog becomes aggressive and you pick them up, you are rewarding them for that aggression. Do not pick your dog up when they are misbehaving; your dog interprets it as affection.  Be aware also of how you touch your dog. Quick, hyper taps can escalate your dog’s excitement. Slow, deep, circular motions will calm her down. Just be aware of when and how you pet your dog. Best time to pet is when your dog is calm or when she has done something you like.