変数の相互作用を使用するときに cox 回帰をプロットして、調整された生存曲線をプロットしようとしています。
survfit.coxph ページhttps://stat.ethz.ch/R-manual/R-devel/library/survival/html/survfit.coxph.html
を読むと、パラメータ「newdata」が表示されます
newdata
a data frame with the same variable names as those that appear in the coxph formula. It is also valid to use a vector, if the data frame would consist of a single row.
The curve(s) produced will be representative of a cohort whose covariates correspond to the values in newdata. Default is the mean of the covariates used in the coxph fit.
コックス出力で相互作用である行をプロットしたい場所。つまり、cox の出力が次のようになっている場合:
coef exp(coef) se(coef) z p
Drug2 -0.1345 0.876 0.1812 -0.732 4.5e-01
Drug3 -0.3678 0.719 0.0816 -3.966 7.2e-05
Drug4 0.0468 1.063 0.0432 0.932 3.4e-01
Sex 0.2574 1.294 0.0786 3.133 1.2e-03
Sex:Drug2 -0.1283 0.880 0.1809 -0.709 4.8e-01
Sex:Drug3 -0.3226 0.724 0.0817 -3.950 7.8e-05
Sex:Drug4 0.0524 1.054 0.0574 0.913 3.6e-01
との相互作用の後、Drug 変数の新しい生存曲線をプロットしたいと考えていますSex
。
newdata
これがこのパラメーターにつながります。
newdata を呼び出す場合と比較して、newdata を含めずに共変量の平均を使用する場合の違いは何ですか。この時点で、newdata を正しく構築する方法さえわかりません。
newdata
コックスモデルに基づいてどのように構築するか、また平均を使用することと比較してその重要性について誰かが私に何か指針を与えることができれば. cox データに基づいてこの新しい生存プロットをプロットすると、元の生存曲線と同じ量の線が期待できるはずです。