Of course, when we teach these behavioral responses the mantra is always, STAY PUT! The best place to, 'hunker on down' is in a preselected, 'safe room'. Get down behind a large piece of furniture and GET ON YOUR CELL PHONE TO 911.
(It's best to speak; however, if all you do is simply to leave that phone turned on and connected to 911, the police dispatcher WILL be able to locate you by using nothing more than the transmission signal. Remember NOT to hang up until AFTER the police arrive.)
The recommended, 'survival kit' is (1) a reliable firearm whose operation you are familiar with as well as a couple of reloads, (2) a fully charged cell phone, (3) a powerful flashlight that can be operated with one hand, (3) and a key to your entry door attached to a large bright key fob.
Your, 'safe room' should have a window. Ideally that window should allow you to communicate with anyone arriving at the house; you will be able to throw your house key out of it; and that key will be able to be easily found by the arriving police.
If worse comes to worse, you might even be able to use that window for quick egress from the building - Just remember that, 'quick egress' also means, 'easy access' as well as the possibility of being too easily seen; so keep that window closed and covered until you need to open it.
As much as I dislike restating this last part, I'm bound by course requirements to tell you that the (largely) agreed self-defense reaction is to loudly call out a warning. Something to the effect of: 'Stop!' 'I have a gun; and I'm ready to use it!' 'The police have been called and are on the way!' 'Leave now!' 'Leave now!'
Me? I wouldn't, personally, behave this way; but, someone with less training or experience probably should. OK.