Rinty got loose often when we lived in Florida (with my parents). My parents didn't really believe in dog training. They assumed the dog had to be particularly smart and have natural ability to just do things without being taught. They also believed if someone could train a dog they had to be experts...and I certainly wasn't that. So while they were amused at some of the things I had taught Rinty, they didn't think much of it and often undermined my attempts at progress.
My dad especially didn't want to change his ways. See he grew up on a farm and was used to dogs being off leash - "dogs in Cuba always knew to come back", he'd say. Well, Rinty didn't. He had not been taught recall and was still intact so he had a lot of reason to run off and very little reason to return when we wanted him to. My dad daily let him out off leash and allowed him to walk up and down the block before calling him back. Usually he did, but not if there was a cat, squirrel, dog in heat, little kids, etc. My dad would get angry, and yell at him, sometimes smack his behind when he returned (yeah I wouldn't like coming back either!)
My mom had a different problem. She wasn't particularly attentive to the dog and it never failed to be that when she opened the door for any reason, Rinty would get out. Often I would get home and see him strolling down the street and my dad found him in the middle of a busy intersection once a few blocks from the house. We had several neighbors threaten us and give us dirty looks when he stomped on their flower beds or pooped on their lawns (which my dad would never pick up).
My point is, dogs get loose, and for a million reasons. Even a well trained dog and mindful dog parent can encounter this (Rex can open doors that are not locked and let himself out... in front of clients is his favorite time to do this).
So, what do you instinctively do when your dog gets out? You chase him! Does it work? No. Do you keep doing it? Yes. Why? Well, you probably don't know what else to do. Rest assured, there's a better way.
The right way to get your dog to come back is to squat down and very excitedly, in a high pitched voice yell out. You can say "come here Fido, you good boy!" You can say anything really. The moment your dog looks at you and you have his attention, turn around and run away - this is counter intuitive, I know, but trust me, its much much much more likely to work than if you chase him. Some dogs may just run right back to you and if so, just grab hold of him and praise him. Give him a treat. Give him scratchies. Rub his belly. Play fetch. Whatever he enjoys most.
Why does this work?
Few reasons:
1 - Dogs like to play chase. Being chased is just as fun as chasing you. And I promise you, when your dog runs away from you while you're chasing him and yelling at him at the top of your lungs, he is having so much fun. Its a game to him. Use this to your advantage and get him chasing you instead.
2 - Coming back to being scolded, yelled at, yanked inside, and you being upset is not fun. Think of anytime you got in trouble at school and you knew your parents were told about it. Did you rush to get home that day? You likely were dreading it because you knew what was waiting for you at him. Once your dog is out and realizes you're upset he's just trying to enjoy it while it lasts. He has no reason to rush back home. So give him a reason by being excited and loving when he does. Each time he has this positive reward for coming back, he will come back faster.
Ways to prevent escapes
Exercise & stimulation
When dogs run off, its likely they haven't gotten out enough. The more physical exercise and mental stimulation you provide, the less interest he'll in exploring the great outdoors without you. A tired dog is a good dog.
Recall Training
If there is one single thing every dog should know how to do is come when called. I've sighed a sigh of relief so many times when a dog rushes towards a cat, bird, or across the street but immediately turns around and comes back when I call him. A HUGE SIGH OF RELIEF. Train your dog to come back. It can save his life.
Pay attention
This seems simple and obvious but paying attention to your dog can prevent a lot of accidents. Be mindful of the things that tend to entice him to run out the door. If you have guests coming in and out, make them aware that the dog may get out if they're not paying attention - or be on your toes if you know your guests are careless or aren't used to dogs.
There you have it. Its simple - make yourself the place your dog wants to come back to. You'll both have a better relationship for it.