Where might intruders gain sudden entry to your house? Where might you be at the time? Where would your weapon be? Would you be able to get to it quickly? How might your answers to these questions influence your decision?
For decades, I kept a 9MM handgun in the bedroom. It occurred to me some time ago that there is no reason to be assured that I would be in the bedroom at the time of a home invasion, and more importantly, that I might well not be able to get to the bedroom if an invasion were to occur.
I now employ a different strategy. It would not work with a shotgun.