I would like to estimate the parameters of a distribution that I obtain via TransformedDistribution
:
bDist[σ_, λ_] := TransformedDistribution[real + noise,
{real \[Distributed] ExponentialDistribution[λ],
noise \[Distributed] NormalDistribution[0, σ]}]
(This new object is an exponentially-modified Gaussian for reference.) So, I generate some data using the newly-created distribution:
data = RandomVariate[bDist[2, 1/3], {10000}];
Then try to estimate its parameters, using FindDistributionParameters
:
FindDistributionParameters[data, bDist[σ, λ]]
Which produces an error:
"The support of the distribution TransformedDistribution.... could not be determined.
The validity of the data for TransformedDistribution.... could not be determined"
Where "..." is the full detail of the TransformedDistribution
I form above.
It seems to me that these errors suggest that I need to "manually" tell Mathematica what the support of this transformed distribution is. This seems odd - I would have thought that Mathematica could determine that the distribution has support over the entire real line.
I have tried placing assumptions on the parameters (constraining them to be positive), but this doesn't seem to work. I have also tried using EstimatedDistribution
, which produces the same errors as above (makes sense since I think they are the same thing under the hood.)
I have also tried using the Laplace distribution which naturally has support over all the real line (opposed to the exponential which is only over the positive reals), but this produces the same error.
There aren't any examples where Mathematica uses derived distributions formed from TransformedDistribution
on the help page for the FindDistributionParameters
function. Neither is there any information on how one could define support on a function.
Finally, I tried using Maximize
on a LogLikelihood
object, but this takes far longer (as this questionthis question taught me), and only works for small data samples.
Does anyone have an idea as to how I can solve this problem?