Patience, patience, patience. And be consistent about showing your puppy where you want her to go. And females can take longer to housebreak than males. My female hound was pooping on the carpet for months every now and then. She took forever to learn.
After an accident, do you always take her to the same place in your yard and use the same command?
Do you do the same (take her out and give the command) every hour or so during the day and right after eating?
Do you notice the signs that she might be needing to go - sniffing, etc., and take her out right then and there?
Are you away for long periods of time during the day - this will cause her to have a longer learning curve, believe me, I speak from experience.
Don't lose your patience - she isn't a human and doesn't think like a human. She only wants to please you, but YOU need to show her (REPEATEDLY and CONSISTENTLY) what you want her to do.
And four months old is still very young. Even though she may know what she is supposed to do, her bladder is very small and can't be held for a long period of time.
BTW, yelling, and god forbid, hitting or rubbing their nose in "it" DOES NOT help at all.
Good luck! It is trying, I know, but she will learn.
And I highly recommend FOLEX carpet spot remover
