class zepid.base.Sensitivity(alpha=0.05)

Generates the sensitivity and (1-alpha)% confidence interval, comparing test results to disease status from pandas dataframe

Sensitivity is calculated from

\[Sensitivity = \frac{TP}{P}\]

Wald standard error is

\[SE_{Wald} = \left(\frac{1}{TP} - \frac{1}{P}\right)^{\frac{1}{2}}\]


Disease & Test must be coded as (1: yes, 0:no)

Parameters:alpha (float, optional) – Alpha value to calculate two-sided Wald confidence intervals. Default is 95% confidence interval


Calculate the sensitivity in a data set

>>> from zepid import Sensitivity, load_sample_data
>>> df = load_sample_data(False)
>>> sens = Sensitivity()
>>> sens.fit(df, test='art', disease='dead')  # Note this example is not great... ART is a treatment not test
>>> sens.summary()

Initialize self. See help(type(self)) for accurate signature.


__init__([alpha]) Initialize self.
fit(df, test, disease) Calculates the Sensitivity
summary([decimal]) Prints the summary results