What influences the amount of influence (no pun intended) a heir gets when he is coronated?

Is it the heirs stats? The amount of provinces under his control? The influence of the old king? all of the above?