/usr/share/pyshared/statsmodels/sandbox/survival.py is in python-statsmodels 0.4.2-1.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | import numpy as np
class SurvivalTime(object):
def __init__(self, time, delta):
self.time, self.delta = time, delta
def atrisk(self, time):
raise NotImplementedError
class RightCensored(SurvivalTime):
def atrisk(self, time):
return np.less_equal.outer(time, self.time)
class LeftCensored(SurvivalTime):
def atrisk(self, time):
return np.greater_equal.outer(time, self.time)
|