If the repairs are minor and the unit is relatively new, repairing it can be cost-effective. However, if the unit is old, the repair cost is significant, or you seem to be perpetually dealing with repair issues, it might be more practical to go for a new water heater installation.