We like to imagine that all dogs are good dogs — and the vast majority of them never give us a reason to question that belief — but just how good they are is something that can change over time. A new study suggests that canine personalities aren’t set in stone and, just like humans, they can go through dramatic personality changes based on life events.

The research, which was published in Journal of Research in Personality, is the largest study of dog personality ever conducted. Over 1,600 dogs spanning 50 different breeds were included in the work, which surveyed pet owners and attempted to draw links between life events and changes in the behavior of the animals and their caretakers.

“When humans go through big changes in life, their personality traits can change. We found that this also happens with dogs—and to a surprisingly large degree,” William Chopik, lead author of the study, said in a statement.

“We expected the dogs’ personalities to be fairly stable because they don’t have wild lifestyle changes humans do, but they actually change a lot. We uncovered similarities to their owners, the optimal time for training and even a time in their lives that they can get more aggressive toward other animals.”

The researchers found that the old adage that you can’t teach an old dog new tricks does have some basis in reality, with older animals being harder to train once they are set in their ways. But what was particularly interesting to the scientists was how the personalities of dogs tended to follow that of their owners.

Active and outgoing individuals tended to be matched with dogs that were the same, while dogs that were anxious or hostile had owners that were more negative. Pets that were more excitable and happy were also shown to be easier to train, while the fearful and anxious animals didn’t respond as well to direction.

“There are a lot of things we can do with dogs—like obedience classes and training—that we can’t do with people,” Chopik explains. “Exposure to obedience classes was associated with more positive personality traits across the dog’s lifespan. This gives us exciting opportunities to examine why personality changes in all sorts of animals.”