similar to: error message obtained when plotting survival curves (error not previously obtained)

Displaying 20 results from an estimated 3000 matches similar to: "error message obtained when plotting survival curves (error not previously obtained)"

2011 Apr 06
1
Error in match.names(clabs, names(xi))
Hi Guys, I have this part of a program: library(survival) Gastric <- cbind.data.frame(Gp=c(rep(1,45),rep(0,45)), ### 2nd gp 0 time=c(1,63,105,129,182,216,250,262,301,301,342,354,356,358, 380,383, 383,388,394,408,460,489,499,523,524,535,562,569,675,676, 748,778,786,797,955,968,1000,1245,1271,1420,1551,1694,2363,2754,2950,
2009 Apr 20
1
bladder1 dataset in survival library
Hello, In package survival should be a dataset bladder1. http://stat.ethz.ch/R-manual/R-devel/library/survival/html/bladder.html I can not open it (not found). Both bladder and bladder2 are there. Thanks, Petra
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
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 <-
2012 Apr 16
2
Survival Curves
Hello I'm trying to make survival curves for some longevity data - 100 males and 100 females, some of which are still living (not dead at the end of survey) I would like to make sex specific survival curves as time on the X axis, proportion alive on the Y, and a line for each sex (two lines) Data looks like this: Focal DOB DOD Longevity Sex 1 89-04-20 na
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 <-
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
2012 Jan 24
1
Plotting coxph survival curves
Hi, I am attempting to plot survival curves estimated by cox proportional hazards regression model. The formula for the model is this: F.cox.weight <- coxph(Surv(Lifespan, Status) ~ MS + Weight + Laid + MS:Laid + Weight:Laid, data = LongF) MS = Mating status (mated/virgin) Weight = adult female weight, continuous covariate Laid = number of eggs laid by each female, continuous covariate I
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
2011 Jul 15
1
Plotting survival curves from a Cox model with time dependent covariates
Dear all, Let's assume I have a clinical trial with two treatments and a time to event outcome. I am trying to fit a Cox model with a time dependent treatment effect and then plot the predicted survival curve for one treatment (or both). library(survival) test <- list(time=runif(100,0,10),event=sample(0:1,100,replace=T),trmt=sample(0:1,100,replace=T)) model1 <- coxph(Surv(time,
2017 Oct 07
2
Adjusted survival curves
For adjusted survival curves I took the sample code from here: https://rpubs.com/daspringate/survival and adapted for my date, but got error. I would like to understand what is my mistake. Thanks! #ADAPTATION FOR MY DATA library(survival) library(survminer) df<-read.csv("F:/R/data/base.csv", header = TRUE, sep = ";") head(df) ID start stop censor sex age stage treatment 1
2017 Oct 07
2
Adjusted survival curves
For adjusted survival curves I took the sample code from here: https://rpubs.com/daspringate/survival and adapted for my date, but ... have a QUESTION. library(survival) library(survminer) df<-read.csv("base.csv", header = TRUE, sep = ";") head(df) ID start stop censor sex age stage treatment 1 1 0 66 0 2 1 3 1 2 2 0 18 0 1 2 4 2 3 3 0 43 1 2 3 3 1 4 4 0 47 1 2 3 NA 2 5 5
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
2010 Jul 28
1
anderson-darling test
Hi, I have the binned data (observed and generated from model)  that I would like to test using the anderson-darling goodness of fit test.  But I'm not sure which package in R to use. I tried ad.test(...) but it does not recognise the test by Vito Ricci in FITTING DISTRIBUTIONS WITH R   > ad.test(hist_hume_beec[,1],hist_hume_beec[,2]) Error: could not find function "ad.test"
2004 Jun 21
1
Novice question: Smooth interpolation of survival curve
Greetings, How might one go about generating a smooth interpolation of a survival curve generated by the survfit function in the survival package? I am able to package my variables by standard methods >x<-(survfit(Surv(time),data) and plot the "step" curve, but would like to obtain a smooth estimation curve for the purpose of approximating survival time between steps on the
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
2009 Mar 10
4
puzzled by math on date-time objects
Hi, I don't understand the following. When I create a small artificial set of date information in class POSIXct, I can calculate the mean and the median: a = as.POSIXct(Sys.time()) a = a + 60*0:10; a [1] "2009-03-10 11:30:16 EDT" "2009-03-10 11:31:16 EDT" "2009-03-10 11:32:16 EDT" [4] "2009-03-10 11:33:16 EDT" "2009-03-10 11:34:16
2008 Oct 20
2
error message when plotting survival curves
I am trying to plot survival curves using the following code as an example: >rs1799964.coxph<-(coxph(Surv(sassurvmonths,status)~age+stage+rs1799964_TNFA,method="efron")) >plot(rs1799964.coxph,lyt=c(1,3),xlab="Survival in Months",ylab="Proportion Surviving") I am gettingthe following error message: >Error in xy.coords(x, y, xlabel, ylabel, log) :
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!
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 <-