I don't believe you can produce a general function for this. It will depend on the exact gene and organism you are considering.
From a molecular point of view, the vast majority of recessive mutations result from a change producing either a non-functional protein product or a truncated product that is cleaned up by the cell. We can reasonably assume that most modifications significant enough to produce a phenotype will be of this class since there are more mutational sites which can produce a non-functioning product than can produce a product of changed function but the exact ratio of one to the other is not going to be equal across different genes and organisms.
Note as well that the whole notion of recessive and dominant traits is probably an over-simplification and, in fact, there are subtle differences between homozygotes and heterozygotes in many, perhaps most, cases so I'm not sure how useful an estimate would be even if you had one.