# How to pass a custom method to a particular option?

In an answer to my question More efficient method to compute moments of the Johnson $S_B$ distribution, J. M. has come up with a method to compute the moments of the Johnson $S_B$ distribution, which seems to be much more efficient than the built-in one. Now, I want to use this in things like

EstimatedDistribution[data, JohnsonDistribution["SB", γ, δ, µ, σ],
ParameterEstimator -> "MethodOfMoments"]


Is there a way to do it?

• Consider all symbols of the form **Moment*. I believe the ones you will be interested in are StatisticsLibraryNMeanDefinition (for your last question) and StatisticsLibraryNMomentDefinition (for this one). They both eventually call NExpectation. You could put your own definition anywhere in this call chain, although where is the best place is probably something only the developer of this code can answer. – Oleksandr R. Oct 24 '15 at 23:11
• My own attempts at spelunking seem to point to StatisticsDistributionEstimateDumpkthMoment[]` as the function internally called to evaluate moments by the fitting functions. As Oleksandr notes, some hijacking will be necessary, but it is not currently clear to me how to best go about this. – J. M. will be back soon Oct 25 '15 at 1:31