scipy.stats._result_classes.EmpiricalDistributionFunction.

confidence_interval#

EmpiricalDistributionFunction.confidence_interval(confidence_level=0.95, *, method='linear')[原始碼]#

計算 CDF/SF 點估計值的信賴區間

參數:
confidence_levelfloat, 預設值: 0.95

計算信賴區間的信賴水準

methodstr, {“linear”, “log-log”}

用於計算信賴區間的方法。選項包括 “linear”(傳統 Greenwood 信賴區間,預設值)和 “log-log”(“指數 Greenwood”,對數負對數轉換信賴區間)。

回傳:
ciConfidenceInterval

一個具有屬性 lowhigh 的物件,分別代表信賴區間下限和上限的 EmpiricalDistributionFunction 實例。

說明

信賴區間根據 Greenwood 公式 (method='linear') 或更新的 “指數 Greenwood” 公式 (method='log-log') 計算,如 [1] 中所述。傳統 Greenwood 公式可能導致下限小於 0,上限大於 1;這些值會被裁剪到單位區間。兩種方法都可能產生 NaN;這些是公式的特性。

參考文獻

[1]

Sawyer, Stanley. “生存分析中的 Greenwood 和指數 Greenwood 信賴區間。” https://www.math.wustl.edu/~sawyer/handouts/greenwood.pdf