6.3.10.1.2. statsmodels.sandbox.distributions.otherdist.ParametricMixtureD¶
-
class
statsmodels.sandbox.distributions.otherdist.
ParametricMixtureD
(mixing_dist, base_dist, bd_args_func, bd_kwds_func, cutoff=0.001)[source]¶ mixtures with a discrete distribution
The mixing distribution is a discrete distribution like scipy.stats.poisson. All distribution in the mixture of the same type and parameterized by the outcome of the mixing distribution and have to be a continuous distribution (or have a pdf method). As an example, a mixture of normal distributed random variables with Poisson as the mixing distribution.
assumes vectorized shape, loc and scale as in scipy.stats.distributions
assume mixing_dist is frozen
initialization looks fragile for all possible cases of lower and upper bounds of the distributions.
create a mixture distribution
Parameters: mixing_dist : discrete frozen distribution
mixing distribution
base_dist : continuous distribution
parameterized distributions in the mixture
bd_args_func : callable
function that builds the tuple of args for the base_dist. The function obtains as argument the values in the support of the mixing distribution and should return an empty tuple or a tuple of arrays.
bd_kwds_func : callable
function that builds the dictionary of kwds for the base_dist. The function obtains as argument the values in the support of the mixing distribution and should return an empty dictionary or a dictionary with arrays as values.
cutoff : float
If the mixing distribution has infinite support, then the distribution is truncated with approximately (subject to integer conversion) the cutoff probability in the missing tail. Random draws that are outside the truncated range are clipped, that is assigned to the highest or lowest value in the truncated support.
-
__init__
(mixing_dist, base_dist, bd_args_func, bd_kwds_func, cutoff=0.001)[source]¶ create a mixture distribution
Parameters: mixing_dist : discrete frozen distribution
mixing distribution
base_dist : continuous distribution
parameterized distributions in the mixture
bd_args_func : callable
function that builds the tuple of args for the base_dist. The function obtains as argument the values in the support of the mixing distribution and should return an empty tuple or a tuple of arrays.
bd_kwds_func : callable
function that builds the dictionary of kwds for the base_dist. The function obtains as argument the values in the support of the mixing distribution and should return an empty dictionary or a dictionary with arrays as values.
cutoff : float
If the mixing distribution has infinite support, then the distribution is truncated with approximately (subject to integer conversion) the cutoff probability in the missing tail. Random draws that are outside the truncated range are clipped, that is assigned to the highest or lowest value in the truncated support.
-