을에 survminer 패키지 (ggsurvplot)를 사용하여 검열 이벤트의 모양 변경 :내가 꽤 잘 작동 R의 카플란 - 마이어 곡선, 만들 수 survminer 패키지를 사용하고 R
plotUICC=survfit(Surv(as.numeric(myData$eventtime),event=myData$eventtype)~myData$UICC, data = myData)
ggsurvplot(plotUICC,data=myData, risk.table = FALSE,pval = TRUE,conf.int = FALSE,legend.labs = c("UICC I", "UICC II"),legend = c(0.25, 0.26),legend.title = "",xlab = "Time in Months"))
Kaplan Meier Curve created with the Cod above을
"+"를 검열 된 이벤트로 변경하고 간단한 "|" 대신. 불행히도 도움도 (ggsurvplot)도 구글도 나를 도울 수 없다.
이들은로드 packeges있다 : 하나는 예컨대, 검열의 형상을 변경하려는 이상적
library(survminer)
library(survival)
fit <- survfit(Surv(time, status) ~ sex, data = lung)
p1 <- ggsurvplot(fit, data = lung)
:
other attached packages:
[1] ggthemes_3.4.0 survminer_0.3.1 ggpubr_0.1.2 ggplot2_2.2.1 survival_2.40-1
[6] readxl_0.1.1 gridExtra_2.2.1
당신이 확장 가능 :이 제안은 현재 합병, ggsurvplot의 development version 지금 censor.shape 및 censor.size 인수를 받아 귀하의 질문에 최소한의 작업 예제 (http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example)를 제공하십시오. – CMichael