Displaying 20 results from an estimated 5000 matches similar to: "Novice question: Smooth interpolation of survival curve"
2013 Jan 17
3
coxph with smooth survival
Hello users,
I would like to obtain a survival curve from a Cox model that is smooth and does not have zero differences due to no events for those particular days.
I have:
> sum((diff(surv))==0)
[1] 18
So you can see 18 days where the survival curve did not drop due to no events.
Is there a way to ask survfit to fit a nice spline for the survival??
Note: I tried survreg and it did not
2012 Nov 26
1
Plotting an adjusted survival curve
First a statistical issue: The survfit routine will produce predicted survival curves for
any requested combination of the covariates in the original model. This is not the same
thing as an "adjusted" survival curve. Confusion on this is prevalent, however. True
adjustment requires a population average over the confounding factors and is closely
related to the standardized
2007 Jun 17
1
error bars on survival curve
I am using plot(survfit(Surv(time,status) ~...) and would like to add
error bars rather than the confidence intervals. Am I able to do this
at specified times? e.g. when time = 20 & 40.
leukemia.surv <- survfit(Surv(time, status) ~ x, data = aml)
plot(leukemia.surv, lty = 2:3,xlim = c(0,50))
#can i add error bars at times 20 & 40?
legend(100, .9, c("Maintenance", "No
2013 Jan 31
1
obtainl survival curves for single strata
Dear useRs,
What is the syntax to obtain survival curves for single strata on many subjects?
I have a model based on Surv(time,response) object, so there is a single row per subject and no start,stop and no switching of strata.
The newdata has many subjects and each subject has a strata and the survival based on the subject risk and the subject strata is needed.
If I do
newpred <-
2010 Sep 23
2
extending survival curves past the last event using plot.survfit
Hello,
I'm using plot.survfit to plot cumulative incidence of an event.
Essentially, my code boils down to:
cox <-coxph(Surv(EVINF,STATUS) ~ strata(TREAT) + covariates, data=dat)
surv <- survfit(cox)
plot(surv,mark.time=F,fun="event")
Follow-up time extends to 54 weeks, but the last event occurs at week
30, and no more people are censored in between. Is there a
2009 Mar 31
2
error message obtained when plotting survival curves (error not previously obtained)
Hello,
I now receive an error message when obtaining a survival plot, which
was not previously received with the same code. I recently updated
all my packages. It does not seem to be a peculiarity of my data as I
receive the error using data available in R. A plot is produced but I
am uncertain regarding the error message.
> library(surv2sample)
> data(gastric)
> fit <-
2011 Jan 14
1
Survfit: why different survival curves but same parameter estimates?
Hello,
I'm trying to estimate a Cox proportional hazard model with time-varying covariates using coxph. The parameter estimates are fine but there is something wrong with the survival curves I get with survfit (results are not plausible).
Let me explain why I think something's wrong.
To make sure I'm setting up my data correctly to estimate a model with time-varying covariates, I
2006 Dec 21
1
: newbie estimating survival curve w/ survfit for coxph
I am wondering how to estimate the survival curve for a particular case(s)
given a coxph model
using this example code:
#fit a cox proportional hazards model and plot the
#predicted survival curve
fit <- coxph(
Surv(futime,fustat)~resid.ds+strata(rx)+ecog.ps+age,data=ovarian[1:23,])
z <- survfit(fit,newdata=ovarian[24:26,],individual=F)
zs <- z$surv
zt <-
2010 Aug 31
1
Speeding up prediction of survival estimates when using `survifit'
Hi,
I fit a Cox PH model to estimate the cause-specific hazards (in a competing risks setting). Then , I compute the survival estimates for all the individuals in my data set using the `survfit' function. I am currently playing with a data set that has about 6000 observations and 12 covariates. I am finding that the survfit function is very slow.
Here is a simple simulation example
2011 Oct 01
4
Is the output of survfit.coxph survival or baseline survival?
Dear all,
I am confused with the output of survfit.coxph.
Someone said that the survival given by summary(survfit.coxph) is the
baseline survival S_0, but some said that is the survival S=S_0^exp{beta*x}.
Which one is correct?
By the way, if I use "newdata=" in the survfit, does that mean the survival
is estimated by the value of covariates in the new data frame?
Thank you very much!
2007 May 07
1
Predicted Cox survival curves - factor coding problems..
The combination of survfit, coxph, and factors is getting confused. It is
not smart enough to match a new data frame that contains a numeric for sitenew
to a fit that contained that variable as a factor. (Perhaps it should be smart
enough to at least die gracefully -- but it's not).
The simple solution is to not use factors.
site1 <- 1*(coxsnps$sitenew==1)
site2 <-
2009 Feb 25
3
survival::survfit,plot.survfit
I am confused when trying the function survfit.
my question is: what does the survival curve given by plot.survfit mean?
is it the survival curve with different covariates at different points?
or just the baseline survival curve?
for example, I run the following code and get the survival curve
####
library(survival)
fit<-coxph(Surv(futime,fustat)~resid.ds+rx+ecog.ps,data=ovarian)
2005 Sep 19
2
Problem with tick marks in lines.survfit (package survival)
I have attempted to follow posting guidelines but I have failed to find out
what I am doing wrong here.
I am trying to use lines.survfit to plot a second curve onto a survival
curve produced by plot.survfit. In my case this is to be a progression free
survival curve superimposed upon an overall survival curve, but I will
illustrate my problem using the example given in the help for
2011 Mar 18
1
median survival time from survfit
Hello,
I am trying to compute the mdeian of the survival time from the function
survfit:
> fit <- survfit(Surv(time, status) ~ 1)
> fit
Call: survfit(formula = Surv(time, status) ~ 1)
records n.max n.start events median 0.95LCL 0.95UCL
111 111 111 20 NA NA NA
The results is NA? the fit$surv gives values between 1 and 0.749! Am I doing
this correct?
2012 Nov 26
1
Plotting an adjusted kaplan-meier curve
Dear R-users
I am trying to make an adjusted Kaplan-Meier curve (using the Survival package) but I am having difficulty with
plotting it so that the plot only shows the curves for the adjusted results.
My data come from a randomised controlled trial, and I would like the adjusted Kaplan-Meier
curve to only show two curves for the adjusted survival: one for those on treatment (Treatment==1)
2017 Aug 27
0
How to get CI from surfit object in survival
Did you not notice the conf.type = "none" argument to your survfit
call and the associated documentation in the survfit help?
-- Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Sat, Aug 26, 2017 at 5:18 PM, Adrian Johnson
2010 Dec 27
1
Problem using pkg "survival"
Hello all.
I've been attempting to utilize the "survival" pkg (
http://cran.r-project.org/web/packages/survival/index.html), while reading
through this guide (http://www.ms.uky.edu/~mai/Rsurv.pdf). I figured working
through the guide would be the best way to go, before attempting my own
data.
I tried to utilize the Kaplain-Meier estimator as shown in the guide:
2009 May 22
1
survfit, summary, and survmean (was Changelog for survival package)
> Further I appreciate your new function survmean(). At the moment it
> seems to be intended as internal, and not documented in the help.
The computations done by print.survfit are now a part of the results returned by
summary.survfit. See 'table' in the output list of ?summary.survfit. Both
call an internal survmean() function to ensure that any future updates stay in
2009 Sep 08
1
Obtaining value of median survival for survfit function to use in calculation
Hi,
I'm sure this should be simple but I can't figure it out! I want to get the median survival calculated by the survfit function and use the value rather than just be able to print it. Something like this:
library(survival)
data(lung)
lung.byPS = survfit(Surv (time, status) ~ ph.ecog, data=lung)
# lung.byPS
Call: survfit(formula = Surv(time, status) ~ ph.ecog, data = lung)
1
2017 Aug 27
2
How to get CI from surfit object in survival
Dear Bert,
thank you for suggestion. I am aware of R-help function. I must
apologize, my earlier question could lead to assumptions otherwise.
As you can see below, I only get Std. error but not lower and Upper CIs.
I was wondering if there is another argument or method, could give CIs
which I cannot find anywhere.
Thanks
Adrian
> Nsurv <-