This is about the third or fourth similarly related thread but here goes...
The number one strategy is to not be somewhere that you're likely to suffer a home invasion.
If you can't manage that for whatever reason then your number two strategy is to fortify your entrance points.
If you can't manage that for whatever reason (renting) then your number three strategy is to reinforce your entrance points in cheaper ways you can remove that leave little to no damage when moving house. In either case your reinforcements should not be obvious from the outside (appear weak where you are strong). This stuff is far, FAR more important than what you choose to arm yourself with when faced by a home invader, particularly because if the home invader is determined to get in then your fortifications will give you time to ready yourself and call the police.
But in the spirit of the thread the weapon you choose will depend to some degree on the layout of your house/apartment. Open living spaces will favour swinging weapons whereas people predicting they'll face an attacker in their hallway will fare better with spear-like weapons that can be deployed in a more forward stabbing motion.
In any case you might be called on later to explain why you had such a weapon handy. In Australia you would likely be charged or sued if you seriously injured a home invader with a baseball bat and had no provable explanation for why you had one handy. It would be seen as you having acquired a weapon rather than a sporting implement unless you in fact could show that you played baseball AND had retrieved it from a reasonable location (your sports bag in the closet) AFTER it became apparent that you had no means to avoid the conflict (such as leaving the premises) and AFTER it became apparent that you were in danger of being assaulted.
Ridiculous, but there it is. We have no castle laws here and there are other nations with similar legal stances. You might understand now that how you prevent entry is a far more important than how you face an intruder that's already inside. The longer it takes them to get in the more likely they are to call it a wash, particularly if you're on the other side of the door with a mag lite in one hand and a phone in the other.
On that note the large maglite is the gold standard for a believable tool that just happened to be handy when a home invader came knocking. If you get a variant with a high powered strobe function then so much the better, but keep in mind that home invaders don't often work alone so if they get in then you might still want to consider getting out. Remember that they readied themselves to kick your ass for the last half hour while you on the other hand are probably still looking for your pants and blinking your eyes back to life so the odds are not stacked in your favour just because you're awake, aware and somewhat prepared.
An alternative option is to acquire less than lethal tools of dubious legality, the principle being that you roust off the attackers without hospitalising them and report the attack to the police only as and where it doesn't incriminate you (if the police turn up and there's the unmistakeable stench of pepper spray then they're going to start asking some unpleasant questions).
And remember what Tyson said. Everyone has a plan until they get punched in the mouth. Ideally your defences at very least start when the billion candlepower sensor light loudly clicks on as the would-be attackers enter your yard, incidentally all but setting your across-the-road neighbour's curtains on fire.
A big bloody dog would be nice as well. The typical home invader that hears one of these guys on the other side of the door he's trying to force will start to lose a lot of his motivation to break through.