Deb and Ed M wrote:
He's kind of a miserable dog - he had to live back with us because he pees on the carpet to "punish" my daughter (he had a DOG DOOR to go outside 24/7), and she had to replace the carpet to sell the house. He doesn't pee in MY house because he knows better ;-)
Dogs do not have the capacity to think of an activity to punish. You are putting a human quality into the behavior of an animal and that is called anthropomorphism. However, the indoor peeing at your daughter's house could have been stress caused by something there. Separation anxiety commonly causes unwanted behavior.