[R]{cmprsk} CumIncidence() : 累積発生曲線のあてはめを行うラッパー関数

説明

競合リスクイベントのある生存時間分析を実施する。具体的には3つの機能を持つ。

(1) 群間の累積発生関数(Cumulative Incidence Function ; CIF)の同等性の比較検定(=Gray’s test)

(2) 推定されたCIFを表として出力する。

(3) 推定されたCIFをグラフとして出力する。

Luca Scrucca氏による{cmprsk}パッケージに基づくラッパー関数である。本人のサイトに詳細な解説あり。

使用法

CumIncidence(ftime, fstatus, group, t, strata, rho = 0, cencode = 0,
subset, na.action = na.omit, level,
xlab = "Time", ylab = "Probability",
col, lty, lwd, digits = 4)

 

引数

ftime = 生存期間。failure time variable.

fstatus = 発生したイベントを示すコード。variable with distinct codes for different causes of failure and also a distinct code for censored observations.

group = 比較する群を指定するコード。(estimates will be calculated within groups given by distinct values of this variable. Tests will compare these groups. If missing then treated as all one group (no test statistics).

t = CIFを評価する時点を指定するベクトル。省略すれば自動的で適当な時点間隔で出力される。(a vector of time points where the cumulative incidence function should be evaluated.)

strata = 層別化して検定を実施したい場合に指定する、層を示す変数。stratification variable. Has no effect on estimates. Tests will be stratified on this variable. (all data in 1 stratum, if missing).

rho = 検定のの際に使用される重み付け関数のパワー。デフォルトは0。(power of the weight function used in the tests. By default is set to 0.)

cencode = fstatus引数において打ち切りを示すコード値。value of fstatus variable which indicates the failure time is censored.

subset = 分析に使用するサブセットであるか否かを指定する論理値ベクトル。。a logical vector specifying a subset of cases to include in the analysis.

na.action = 欠損値(ftime,fstatus,group,strata,subset引数に含まれるもの)を処理する方法を指定する関数。デフォルトでは欠損値は無視する。a function specifying the action to take for any cases missing any of ftime, fstatus, group, strata, or subset. By default missing cases are omitted.

level = 信頼区間の幅を指定する[0,1]の範囲の値。例えば95%信頼区間を出力したい場合、level=0.95と指定する。a value in the range [0,1] specifying the level for pointwise confidence bands.

xlab = X軸に表示する文字列。text for the x-axis label.

ylab = Y軸に表示する文字列。text for the y-axis label.

col = 曲線を描画する際に使用される色を指定する。color(s) used for plotting curves (see plot.default).

lty = 曲線を描画する際に使用される線の種類を指定する。line type(s) used for plotting curves (see plot.default).

lwd = 曲線を描画する際に使用される線の幅を指定する。line width(s) used for plotting curves (see plot.default).

digits = 値を出力する際に使用する有効桁数。デフォルトは4。number of significant digits used for printing values. By default set at 4.

出力の読み方

Competing risk analysis using R: an easy guide for cliniciansより出力例を引用し、その読み方を以下に注釈として示す(画像をクリックすると拡大されます)。

コメント