阴影95%置信区间,使用termplot函数

时间:2017-07-20 10:40:35

标签: r

如何绘制使用" termplot"绘制的95%置信区间。功能在不同的阴影?如果你能帮助我,我将不胜感激。代码如下:

mfit <- coxph(Surv(time, status) ~ age + pspline(rsbp, df=4), data=data)

termplot(mfit, term=2, se=TRUE, col.term=2, col.se="gray",cex=4, plot=TRUE)

数据摘要&#34;

-3 投票 接受 &#34; 98418&#34;,&#34; 98419&#34;,&#34; 98420&#34;,&#34; 98421&#34;,&#34; 98422&#34;,&#34; 98423& #34;,&#34; 98424&#34;,&#34; 98425&#34;,&#34; 98426&#34;,&#34; 98427&#34;,&#34; 98428&#34;,& #34; 98429&#34;,&#34; 98430&#34;,&#34; 98431&#34;,&#34; 98432&#34;,&#34; 98433&#34;,&#34; 98434&# 34;,&#34; 98435&#34;,&#34; 98436&#34;,&#34; 98437&#34;),c(&#34; time&#34;,&#34; status&#34; )),type =&#34; right&#34;,inputAttributes = structure(list(time = structure(list(&label =&#34; tstop&#34;,format.spss =&#34; F8.0&#34) ;),。Name = c(&#34; label&#34;,&#34; format.spss&#34;)),event = structure(list(label =&#34; status&#34;,format.spss =&#34; F8.0&#34;),. Name = c(&#34;标签&#34;,&#34; format.spss&#34;))),. Name = c(&#34; time&#34;,&#34; event&#34;)),class =&#34; Surv&#34;),formula = Surv(data1_merge $ tstop,data1_merge $ status)~data1_merge $ age + pspline(rsbp,df = 4),call = coxph(formula = Surv(data1_merge $ tstop,data1_merge $ status)~data1_merge $ age + pspline(rsbp,df = 4),data = data1_merge) ),。Name = c(&#34;系数&#34;,&#34; var&#34;,&#34; var2&#34;,&#34; loglik&#34;,&#34; iter&#34 ;,&#34; linear.predictors&#34;,&#34;残差&#34;,&#34;表示&#34;,&#34;一致&#34;,&#34;方法&#34;,& #34; df&#34;,&#34; df2&#34;,&#34;惩罚&#34;,&#34; pterms&#34;,&#34; assign2&#34;,&#34;历史&# 34;,&#34; coxlist2&#34;,&#34; printfun&#34;,&#34; n&#34;,&#34; nevent&#34;,&#34; terms&#34;,&# 34;分配&#34;,&#34; wald.test&#34;,&#34; y&#34;,&#34;公式&#34;,&#34;呼叫&#34;),class = c( &#34; coxph.penal&#34;,&#34; coxph&#34;))

0 个答案:

没有答案