I still say this:
If you plan to stand your ground (stay in one place to wait for help), a shotgun is an option.
If you plan to clear your own home (not smart), use a handgun.
It is far too easy (even for me) to grab a long gun out of your hands as you come around a corner.
Imagine I'm the BG (aka 'Bag Guy'). You (homeowner) are coming to get me by clearing your own home. I'm waiting for you on one side of a 90 degree corner (inside the bathroom door, or possibly in the kitchen- either way, just around the corner.) I hear you (homeowner) coming and I know you can't see me. At the very second I see that long barrel come around that corner, I'm going to reach out with both hands, grab the barrel of the gun, and take it away from you. Then I'm going to shoot you with your own gun.
Does this happen? Yes, it does, and I've done it many times, while playing 'bad guy' in a training scenario.
Learn to think like the 'bad guy' does in order to out-plan him. Have your friends play 'Bad Guy' and you (homeowner) use a broom stick, piece of foam pipe insulation, water noodle, etc as a shotgun/rifle. Their goal is to grab the broomstick/foam tube/etc "gun" away from you every chance they get. You, too will learn the lesson I learned through training.
BTW, rifle rounds will penetrate the walls of your home and cause damage/injuries/deaths to disinterested parties. Yes, we have done that training many times, too.
I know someone reading this is thinking that I have no frickin' clue what I'm talking about, so you all try the broomstick "gun" training trick ASAP, and get back to me with what you learned. I really do want someone to get back to me. It will open your eyes pretty quick.
If my advice helps 1 person, I'm thrilled. If I help 1,000 people....you know what I'm about to say.