dear all,

I want to plot a kaplan Meier plot with the following functions, but I fail
to produce the plot I want:

library(survival)
tim <- (1:50)/6
ind <- runif(50)
ind[ind > 0.5] <- 1; ind[ind < 0.5] <- 0;
MS <- runif(50)
pred <- vector()
pred[MS < 0.3] <- 0; pred[MS >= 0.3] <- 1
df <- as.data.frame(cbind(MS, tim, pred, ind))
names(df) <- c("MS", "time", "pred", "class")
df$time[df$time > 6] <- 6
surv <- Surv(as.numeric(as.vector(df$time)),
as.numeric(as.vector(df$class)))
dfPval <- summary(coxph(Surv(as.numeric(as.vector(df$time)),
as.numeric(as.vector(df$class))) ~ pred, df))$sctest
par(mfrow = c(2,2))
plot(survfit(surv ~ df$pred), col=c("red","green"), ylab = "percentage of
survival", xlab = "survival years")
plot(survfit(surv ~ df$pred), col=c("red","green"), lwd = 8, ylab =
"percentage of survival", xlab = "survival years")
plot(survfit(surv ~ df$pred), col=c("red","green"), lwd = 8, ylab =
"percentage of survival", xlab = "survival years", cex = 2)

I would like to increase the tickness of the censorship's pitch. as you can
see with cex = 2, I can elongate the arms of the censorship, but I cant find
how to increase the tickness of the pitch.

how to do this?

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to