scipy.stats.CensoredData.interval_censored#

classmethod CensoredData.interval_censored(low, high)[source]#

Create a CensoredData instance of interval-censored data.

This method is useful when all the data is interval-censored, and the low and high ends of the intervals are already stored in separate one-dimensional arrays.

Parameters:
lowarray_like

The one-dimensional array containing the low ends of the intervals.

higharray_like

The one-dimensional array containing the high ends of the intervals.

Returns:
dataCensoredData

An instance of CensoredData that represents the collection of censored values.

Examples

>>> import numpy as np
>>> from scipy.stats import CensoredData

a and b are the low and high ends of a collection of interval-censored values.

>>> a = [0.5, 2.0, 3.0, 5.5]
>>> b = [1.0, 2.5, 3.5, 7.0]
>>> data = CensoredData.interval_censored(low=a, high=b)
>>> print(data)
CensoredData(4 values: 0 not censored, 4 interval-censored)