statsmodels.distributions.discrete.DiscretizedCount

class statsmodels.distributions.discrete.DiscretizedCount(*args, **kwds)[source]

Count distribution based on discretized distribution

Parameters:
distrdistribution instance
d_offsetfloat

Offset for integer interval, default is zero. The discrete random variable is y = floor(x + offset) where x is the continuous random variable. Warning: not verified for all methods.

add_scalebool

If True (default), then the scale of the base distribution is added as parameter for the discrete distribution. The scale parameter is in the last position.

kwdskeyword arguments

The extra keyword arguments are used delegated to the __init__ of the super class. Their usage has not been checked, e.g. currently the support of the distribution is assumed to be all non-negative integers.

Notes

loc argument is currently not supported, scale is not available for discrete distributions in scipy. The scale parameter of the underlying continuous distribution is the last shape parameter in this DiscretizedCount distribution if add_scale is True.

The implementation was based mainly on [1] and [2]. However, many new discrete distributions have been developed based on the approach that we use here. Note, that in many cases authors reparameterize the distribution, while this class inherits the parameterization from the underlying continuous distribution.

References

[1]

Chakraborty, Subrata, and Dhrubajyoti Chakravarty. “Discrete gamma distributions: Properties and parameter estimations.” Communications in Statistics-Theory and Methods 41, no. 18 (2012): 3301-3324.

[2]

Alzaatreh, Ayman, Carl Lee, and Felix Famoye. 2012. “On the Discrete Analogues of Continuous Distributions.” Statistical Methodology 9 (6): 589–603.

Attributes:
random_state

Get or set the generator object for generating random variates.

Methods

__call__(*args, **kwds)

Freeze the distribution for the given arguments.

Methods

cdf(k, *args, **kwds)

Cumulative distribution function of the given RV.

entropy(*args, **kwds)

Differential entropy of the RV.

expect([func, args, loc, lb, ub, ...])

Calculate expected value of a function with respect to the distribution for discrete distribution by numerical summation.

freeze(*args, **kwds)

Freeze the distribution for the given arguments.

interval(confidence, *args, **kwds)

Confidence interval with equal areas around the median.

isf(q, *args, **kwds)

Inverse survival function (inverse of sf) at q of the given RV.

logcdf(k, *args, **kwds)

Log of the cumulative distribution function at k of the given RV.

logpmf(k, *args, **kwds)

Log of the probability mass function at k of the given RV.

logsf(k, *args, **kwds)

Log of the survival function of the given RV.

mean(*args, **kwds)

Mean of the distribution.

median(*args, **kwds)

Median of the distribution.

moment(order, *args, **kwds)

non-central moment of distribution of specified order.

nnlf(theta, x)

Negative loglikelihood function.

pmf(k, *args, **kwds)

Probability mass function at k of the given RV.

ppf(q, *args, **kwds)

Percent point function (inverse of cdf) at q of the given RV.

rvs(*args, **kwargs)

Random variates of given type.

sf(k, *args, **kwds)

Survival function (1 - cdf) at k of the given RV.

stats(*args, **kwds)

Some statistics of the given RV.

std(*args, **kwds)

Standard deviation of the distribution.

support(*args, **kwargs)

Support of the distribution.

var(*args, **kwds)

Variance of the distribution.

Properties

random_state

Get or set the generator object for generating random variates.


Last update: Dec 14, 2023