Re: [R] survival curve for only certain values of a factor

2008-03-13 Thread Dieter Menne
Chang Liu hotmail.com> writes: > > data(aml) > If I use instead dummy variables: > > aml$x1 = (aml$x=="maintained")aml$x2 = (aml$x=="unmaintained") > and I want to plot the survival curve using x1, x2, and I just want the 2 levels, rather than 4 curves from: I don's understand what you want, b

[R] survival curve for only certain values of a factor

2008-03-12 Thread Chang Liu
Hello: Using the built-in dataset aml as an example: data(aml) If I use instead dummy variables: aml$x1 = (aml$x=="maintained")aml$x2 = (aml$x=="unmaintained") and I want to plot the survival curve using x1, x2, and I just want the 2 levels, rather than 4 curves from: fit <- survfit(Surv(