The functions 'age.window' and 'cal.window' in the package 'eha' are
designed to perform 'rectangular cuts' in the Lexis diagram. So, in your
case,
require(eha)
dat <- data.frame(enter = rep(0, length(Survival_days), exit =
Survival_days, event = Outcome)
dat.1 <- age.window(dat, c(0, 2190))
xxx)
# impose earlier stop time?
tstop <- 2
lines(survfit(Surv(ttt) ~ xxx, subset=tttmailto:dwinsem...@comcast.net]
Sent: Wednesday, November 20, 2013 5:49 PM
To: Dr.Vinay Pitchika
Cc: r-help@r-project.org
Subject: Re: [R] How to stop Kaplan-Meier curve at a time point
On Nov 20, 2013, at 1
top)
>
> lines(survfit(Surv(ttt2, ddd) ~ xxx), col=3)
> survdiff(Surv(ttt2, ddd) ~ xxx)
> # green lines match black lines up to tstop
>
>
>
>
> -Original Message-
> From: David Winsemius [mailto:dwinsem...@comcast.net]
> Sent: Wednesday, November 20, 201
Here is the simplest answer that I know.
outcome6 <- ifelse(Survival_days > 2190, 0, Outcome)
survfit(Surv(Survival_days, outcome6) ~ Gender)
This assumes that the variable Outcome is coded as 0/1. If it were instead FALSE/TRUE
then change the 0 to "FALSE" in the first line.
The logrank
One solution is to format the data as if the follow-up period ended on day
2190. For example,
TTT <- Survival_days
DDD <- Outcome
DDD[ TTT>2190 ] <- 0
TTT[ TTT>2190 ] <- 2190
survfit(Surv(TTT, DDD) ~ Gender)
-tgs
On Wed, Nov 20, 2013 at 3:01 PM, Dr.Vinay Pitchika
wrote:
> Hello R users
>
>
On Nov 20, 2013, at 12:01 PM, Dr.Vinay Pitchika wrote:
> Hello R users
>
> I have a question with Kaplan-Meier Curve with respect to my research. We
> have done a retrospective study on fillings in the tooth and their survival
> in relation to the many influencing factors. We had a long follow-u
Hello R users
I have a question with Kaplan-Meier Curve with respect to my research. We
have done a retrospective study on fillings in the tooth and their survival
in relation to the many influencing factors. We had a long follow-up time
(upto 8yrs for some variables). However, we decided to stop
7 matches
Mail list logo