While a dog's wagging tail is often thought to signal happiness, it can also signal fear or anxiety.