similar to: survfit, unused argument(s) (error ...)

Displaying 20 results from an estimated 3000 matches similar to: "survfit, unused argument(s) (error ...)"

2013 Mar 04
2
survfit plot question
Hello, I create a plot from a coxph object called fit.ads4: plot(survfit(fit.ads4)) plot is located at: https://www.dropbox.com/s/9jswrzid7mp1u62/survfit%20plot.png I also create the following survfit statistics: > print(survfit(fit.ads4),print.rmean=T) Call: survfit(formula = fit.ads4) records n.max n.start events *rmean *se(rmean) median 0.95LCL 0.95UCL 203.0
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)
2007 Dec 09
2
Getting estimates from survfit.coxph
Dear all, I'm having difficulty getting access to data generated by survfit and print.survfit when they are using with a Cox model (survfit.coxph). I would like to programmatically access the median survival time for each strata together with the 95% confidence interval. I can get it on screen, but can't get to it algorithmically. I found myself examining the source of print.survfit to
2006 Oct 25
1
Incorrect 'n' returned by survfit()
I've a data set with 60000 rows of data representing 6000+ distinct loans. I did a coxph() regression on it (see call below), but a subsequent survfit() call on the coxph object is almost certainly wrong. It gives n=6 when it should be more like 6000+ (I think) > survfit(resultag) Call: survfit.coxph(object = resultag) n events median 0.95LCL 0.95UCL 6 489 Inf
2014 Mar 06
1
Survfit Error
Hi everyone, I am not new to R, but new to running survival models in R. I am trying to create some basic KM curves, using the following code: library(survival) library(KMsurv) (import data etc - basic right censored, with continuously observed time of death) sleepfit <- survfit(Surv(timeb, death), data = sleep) Here timeb is measured is survival in years, death is a 1/0 indicator (1 =
2007 Apr 29
2
how to code the censor variable for "survfit"
Dear r-helpers, This is my first time to run survival analysis. Currently, I have a data set which contains two variables, the variable of time to event (or time to censoring) and the variable of censor indicator. For the indicator variable, it was coded as 0 and 1. 0 represents right censor, 1 means event of interest. Now I try to use "survfit" in the package of "survival". I
2013 Mar 14
1
cnfidence intervals for survfit()
Hi, I am wondering how the confidence interval for Kaplan-Meier estimator is calculated by survfit(). For example,  > summary(survfit(Surv(time,status)~1,data),times=10) Call: survfit(formula = Surv(rtime10, rstat10) ~ 1, data = mgi)  time n.risk n.event survival std.err lower 95% CI upper 95% CI    10    168      55    0.761  0.0282        0.707        0.818 I am trying to reproduce the
2010 Apr 19
2
Kaplan-Meier survfit problem
When I try to the code from library(survival) of library(ISwR), the following code survfit(Surv(days,status==1)) that could produce Kaplan-Meier estimates shows the following error "Error in survfit(Surv(days, status == 1)) : Survfit requires a formula or a coxph fit as the first argument" How it can be done in R.2.10 -- View this message in context:
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?
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
2010 Sep 10
2
survfit question
Hi, I am attempting to graph a Kaplan Meier estimate for some claims using the survfit function. However, I was wondering if it is possible to plot a cdf of the kaplan meier rather than the survival function. Here is some of my code: library(survival) Surv(claimj,censorj==0) survfit(Surv(claimj,censorj==0)~1) surv.all<-survfit(Surv(claimj,censorj==0)~1) summary(surv.all) plot(surv.all)
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!
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 Mar 30
1
Possible bug in summary.survfit - 'scale' argument ignored?
Hi all, Using: R version 2.8.1 Patched (2009-03-07 r48068) on OSX (10.5.6) with survival version: Version: 2.35-3 Date: 2009-02-10 I get the following using the first example in ?summary.survfit: > summary( survfit( Surv(futime, fustat)~1, data=ovarian)) Call: survfit(formula = Surv(futime, fustat) ~ 1, data = ovarian) time n.risk n.event survival
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
2006 May 19
2
Tick marks in lines.survfit
I posted several months about the problem with adding tick marks to curves using lines.survfit. This occurs when lines.survfit is used to add a curve to survival curves plotted with plot.survfit. The help for this function implies that mark.time=TRUE thus: plot(pfsfit,conf.int=FALSE,xscale=365.25,yscale=100,xlab="Years",ylab="% surviving",lty=2,mark=3)
2012 Nov 17
4
survfit & number of variables != number of variable names
This works ok: > cox = coxph(surv ~ bucket*(today + accor + both) + activity, data = data) > fit = survfit(cox, newdata=data[1:100,]) but using strata leads to problems: > cox.s = coxph(surv ~ bucket*(today + accor + both) + strata(activity), > data = data) > fit.s = survfit(cox.s, newdata=data[1:100,]) Error in model.frame.default(data = data[1:100, ], formula = ~bucket + :
2012 Sep 05
1
showing ticks for censored data in survfit() in the rms package
The answer to this may be obvious, but I was wondering in the rms package and the survfit(), how you can plot the censored time points as ticks. Take for example, library(survival) library(rms) foo <- data.frame(Time=c(1,2,3,4,5,6,10), Status=c(1,1,0,0,1,1,1)) answer <- survfit(Surv(foo$Time, foo$Status==1) ~1) # this shows the censored time points as ticks at Time = 3 and 4 plot(answer)
2008 Dec 06
1
Kaplan-Meier function from survfit
Hi All, Please pardon me if I am missing something obvious here. How do I get the Kaplan-Meier estimate function that is created by survfit and plotted by the code. fit <- survfit(Surv(time, status) , data=aml) plot(fit) That is, I need a function that will give me the survival estimate at a given time: \hat{S}(t). Thanks in advance. Ritwik Sinha ritwik.sinha at gmail.com | +12033042111 |
2009 Oct 13
2
time grid for "survfit" Survival function outputs
Dear All, Maybe it is a silly question. But I wasn't able to find it from manual or R site search. I was wondering what is the corresponding time axis for survival function outputs in "survfit". I think it is "survfit(.......)$time", but not 100% sure. If it is, is it possible we could make survival function outputs on the pre-specified time grid with fixed increment and