Mathematica's RandomVariate
works fine with the KernelMixtureDistribution[]
function, but it doesn't seem to work if you wish to generate random numbers from a product of KernelMixtureDistributions
.
If d1 = KernelMixtureDistribution[data1]
and d2 = KernelMixtureDistribution[data2]
, you can do RandomVariate[d1]
and RandomVariate[d2]
, but, you get an error if you try RandomVariate[d1*d2]
.
Any ideas on how to get around this?
Thanks.
TransformedDistribution[d1 d2, {Distributed[d1, KernelMixtureDistribution[data1], Distributed[d2, KernelMixtureDistribution[data2]}]
. $\endgroup$