Husbands can be stubborn.

Sometimes they insist on thinking they know best. They continually push for their precious freedom. They think their judgments about things are “cool.” They pretend to listen to you, but then they go on doing whatever they want. It can be quite frustrating for a wife.

However, husbands can easily be taught to obey. Indeed, the same principles of operant conditioning, particularly shaping, that are used to train your favorite pet can be used to train your husband.

The first thing to keep in mind is that your husband had a mother, and his mother was his first teacher with respect to how to relate to a woman. Sometimes a mother is a good first teacher, and sometimes not. Nevertheless, she is the first, and as such she has left a lasting imprint on her son’s psyche. And so, the husband always brings with him to a marriage a mother-transference. His wife becomes his surrogate mother.

A smart wife, being aware of this transference, can use it to her advantage. Your husband may be stubborn, defiant, entitled or opinionated toward you just as he was toward his mother. He may be afraid you are going to emasculate him, infantilize him, strangle and devour him with your vagina dentata. This may cause him to constantly appease you (while maintaining a healthy distance) or lie and cheat (in order to get back at you). Don’t take any of this personally. To him (to his inner-child) you are his mother, you are not you. Once you understand this, you can begin to train him.

You begin by being nothing like his mother. This means you need to study his mother. If his mother was controlling and demanding, you need to be the opposite, giving him freedom and trusting that he knows what’s best for him. For example, you can let him choose the clothes he wants to wear. If his mother was too permissive and adoring, so that she spoiled him and gave him the sense that his needs always came first, you must disabuse him of that by firmly setting your boundaries and asserting your own needs. You may have to remind him of your needs 10 to 15 times an hour. He will distrust and fight against this different kind of female persona, whether you are giving him slack or setting your boundaries, but you must persist until he catches on.

Once you have weaned him from the mother-transference, the rest will go smoothly. Now you have become his “good” mother and he will begin to listen to you. Here you commence the formal conditioning. He will now regress to a childlike state and you can use reinforcement and punishment to train him to be the husband you want him to be.

Most of the times, with both husbands and pets, reinforcement (rewarding good behavior) works best. Punishment must be used sparingly, because it may have side effects—such as provoking a fear or anger response that may engender passive or aggressive defiance.

Let’s say, for example, you want to train your husband to listen to you. A lot of husbands would rather play a game on one of their apps, surf the web on their cell phones or laptops, or watch some stupid sporting event on TV rather than listen to how your day went. To get him away from the computer or TV set, you must not try to get him away. Let him do his thing and be patient. The first time he looks up at you and pays a second or two of attention to you, reward him. Just as you would reward a dog for sitting when you say “sit” by giving the dog a snack, you reward your husband the moment he looks up and pays attention. The reward must be immediate to have an effect. The reward may be an approving smile, a kiss, a caress, his favorite snack, or you could simply give him the thumbs-up sign.

Soon he will look up and pay attention to you more and more. Each time you’ll give him an immediate reward. After he has become habituated to looking up and paying attention, you begin the next stage of training. You ask him if he would do you a little favor, accompanying the request with a smile and a kiss. “What’s that, dear?” he may ask. “I had kind of a bad day and I’d like to tell you about it. Would you mind terribly listening to me a few minutes?” “But I’m watching the game, dear,” he protests. “I know dear, I meant after the game,” you say, with a bright, patient, motherly and nurturing smile. “Of course, dear,” he will reply. After he listens to you, you give him another reward.

This will soon become a habit. You won’t even have to ask him. He will listen to you after each game or after an hour of surfing the net. You will have shaped his behavior. Once you have done so in this first instance, you will be able to do so in any other instance, using the same technique. For example, you can train him to make breakfast in the morning, to wash the dishes, to go to the opera, to rub your back, to wash your hair, or mend a tear in your favorite dress.

Of course, now and then you will encounter a recalcitrant husband, a husband who insists on holding on for dear life to his imagined independence. Maybe he will appear to be trained, but you will realize at some point that he is just appeasing you while he sneaks off to do his thing. This is where you may have to use punishment.

Sometimes depriving him of your nurturing smiles will work. Sometimes you will need to go further and deprive him of barbecue or beer. Sometimes, however, you may need to take out the heavy artillery. “Sorry, dear, I’ve hidden the remote.” “You’ve hidden the remote?” he may reply in a shocked and confused little-boy voice. “How could you?” That’s when you give him the talk about how it would be nice if he listened to you once in a while. The remote stays hidden until he does. But use this form of punishment only as a last resort and sparingly. Overuse will weaken its effect.

Men. They’re not that complicated. You just need to know how to work them. They can be trained to obey, and you can at last have peace and contentment in your life.