you need to consider what your house design is and neighbors. while an ar is an excellent weapon it will go thru a couple houses if you miss. also you dont want to be sticking a long barrel around corners as its a dead giveaway your coming and an awesome lever for someone to grab on to in an effort to disarm you. ofcourse training and common sense mitigates these issues.
i personally think a shot gun or hand gun are the best choices. its a toss up between the two. one is more precise the other more forgiving.
the best is a 12 inch shotgun. sure you need to get an aow stamp but its powerful forgiving and can be maneuvered around easily.
FACT: Anything powerful enough and offering sufficient penetration to stop an attacker is going to go through several common interior walls.
FACT: The 5.56mm penetrates less interior walls than most handgun rounds due to the high velocity and fragmentary characteristics of the round.
I am constantly amazed at how many people will complain about the barrel length and handling characteristics of a carbine rifle, then recommend a shotgun. The legal minimum length for a rifle barrel without a permit is 16 inches, compared to 18 inches for a shotgun. And it only takes a little training to mitigate most weapon retention issues. Overall, the advantages a rifle has over a handgun (and IMO, a shotgun) much outweigh the disadvantages.