Some very good advice so far. Just my 2 cents:
You could be missing because of fear, adding undue pressure on the last 2 balls and essentially choking or at least not performing your best in a nice relaxed but focused manner. We all have to get over that at some point, just takes practice, experience, and the various techniques mentioned should help.
I had the opposite problem last year for a bit. Worked on my game and improved a bit, yet I wasn't getting out as much. I would focus on my aim, speed, patterns, etc. in the beginning and middle of the rack but couldn't finish as consistently as I used to. Odd, since I hadn't done that in a while.
A buddy who I hadn't played with in a while saw what was going on. I focused when the rack was tough, traffic to navigate, etc., when I got to the end I sped up my PSR a bit, started one or two stroking some of the easier shots, etc. Almost like I was over that rack and ready to solve the next puzzle. I either missed a ball by just not paying attention or my poor focus caused lazy shots and lazy position which caught up to me by having to shoot a much harder shot than I should have. What worked for me was consciously slowing down, following the same PSR no matter what, and not taking things for granted. Easier said than done... For more nervous type situations, big moments, etc., I will walk around the table, take a drink, etc. before shooting the shot. Once ready, I try and follow my PSR, and on my last stroke I simply focus on making as smooth of a delivery that I can, trusting that I'm lined up right and just try and avoid snatching or rushing the cue or steering at all costs.
Scott