statsmodels.duration.hazard_regression.rv_discrete_float

class statsmodels.duration.hazard_regression.rv_discrete_float(xk, pk)[source]

A class representing a collection of discrete distributions.

Parameters:
xk2d array_like

The support points, should be non-decreasing within each row.

pk2d array_like

The probabilities, should sum to one within each row.

Notes

Each row of xk, and the corresponding row of pk describe a discrete distribution.

xk and pk should both be two-dimensional ndarrays. Each row of pk should sum to 1.

This class is used as a substitute for scipy.distributions. rv_discrete, since that class does not allow non-integer support points, or vectorized operations.

Only a limited number of methods are implemented here compared to the other scipy distribution classes.

Methods

mean()

Returns a vector containing the mean values of the discrete distributions.

rvs([n])

Returns a random sample from the discrete distribution.

std()

Returns a vector containing the standard deviations of the discrete distributions.

var()

Returns a vector containing the variances of the discrete distributions.


Last update: Dec 11, 2024