statsmodels.duration.hazard_regression.rv_discrete_float.rvs#

rv_discrete_float.rvs(n=None, rng=None)[source]#

Returns a random sample from the discrete distribution

A vector is returned containing a single draw from each row of xk, using the probabilities of the corresponding row of pk

Parameters:
nnot used

Present for signature compatibility.

rng{None, int, numpy.random.Generator, numpy.random.RandomState}, optional

If rng is None, a new Generator is created using fresh entropy from the operating system. If rng is an int, a new RandomState instance is created, seeded with rng; this integer-seeding behavior is deprecated and will change to creating a Generator in a future release. If rng is already a Generator or RandomState instance, that instance is used.

random_state{None, int, array_like[int], numpy.random.Generator, numpy.random.RandomState}, optional

Deprecated since version 0.15: random_state has been deprecated. In-line with SPEC-007, use rng for passing a random number generator or seed.

Returns:
ndarray

A vector containing one random draw for each row of xk.