キュービック スプライン解析で参照グループを設定する (ハザード比を 1.0 に設定する) ことはできますか? 私は R を使用して制限された 3 次スプライン モデルを出力しており、7 と 8 の X 値を含むように参照先グループを設定することに熱心でした。
私のコードは以下です。
mfit = coxph(Surv(FLUP,Dx) ~ pspline(exposure) + x1 + x2 +
x3 + x4 + x5 + x6 + x7, data=new)
termplot(mfit, terms = 1, se= TRUE, col.term=1, col.se=1)
ptemp = termplot(mfit,se=TRUE,plot=FALSE)
attributes(ptemp)
newterm = ptemp$exposure
center = with(newterm, y[x==8])
ytemp = newterm$y + outer(newterm$se, c(0,-1.96,1.96),'*')
matplot(newterm$x, exp(ytemp - center), log="y",
type = "l", lty = c(1,2,2), col=1,
xlab = "Exposure", ylab = "Adjusted Hazards Ratio",
main = "Restricted Cubic Spline")