search for: survplot

Displaying 20 results from an estimated 47 matches for "survplot".

2012 Nov 06
3
Survplot, Y-axis in percent
Hi I am a new fan of R after getting mad with the graphical functional in SPSS. I have been able to create a nice looking Kaplan Meyer graph using Survplot function. However I have difficulties in turning the y axis to percent instead of the default 0-1 scale. Further I have tried the function yaxt="n" without any results. Any help in this matter will be appreciated. The code is posted below: par(mfrow=c(1,1)) fit <- survfit(Surv(revre...
2009 Feb 05
4
See source code for survplot function in Design package
Dear R users, I know one way to see the code for a hidden function, say function_x, is using default.function_x (e.g. summary.default). But how can I see the code for imported packages that have no namespace (in this case Design)? Many Thanks Eleni
2009 Oct 26
1
Unable to get Legend with survplot rms package
Hello, I apologize for the post as I am certainly overlooking a simple solution to my difficulties with getting a legend to print on a survplot from the rms package. I am plotting the following: survplot(survest(fita), n.risk=T, conf='none', cex.n.risk=.85, dots=T, col='gray10', lty=2) survplot(survest(fit), n.risk=F, conf='none', add=T) survplot(survest(fitb), n.risk=F, conf='none', col='gray20',...
2006 May 30
1
position of number at risk in survplot() graphs
Dear R-help How can one get survplot() to place the number at risk just below the survival curve as opposed to the default which is just above the x-axis? I tried the code bellow but the result is not satisfactory as some numbers are repeated several times at different y coordinates and the position of the n.risk numbers corresponds t...
2012 Dec 03
1
Confidence bands with function survplot
Dear all, I am trying to plot KM curves with confidence bands with function survplot under package rms. However, the following codes do not seem to work. The KM curves are produced, but the confidence bands are not there. Any insights? Thanks in advance. library(rms) ########data generation############ n <- 1000 set.seed(731) age <- 50 + 12*rnorm(n) label(age) <- &q...
2011 Jul 21
1
Design Survplot performance
...~300 factors with 3 levels each, so about 1000 columns. The 300 factors all pass a preliminary test of association with the outcome. Solving this with cph from Design takes about 3 hours. I have created the fit with x=T, y=T to save the model data. I want to validate the PH assumption by calling survplot(fit, gender=NA, logt=TRUE, loglog=TRUE) for many of the factors (here gender is one column name). Just creating this one plot takes 40m. I'd be happy to sample from the fitted model to create these tests, or figure out another way to check assumptions in the model. Has anyone done something...
2012 Mar 27
1
survplot function
Dear R-helpers I am wondering if there is an option to the survplot function in the design package that allows for drawing Kaplan-Meier plots starting from 0 instead of 1, similar like fun = 'event' in the standard plotting function used on a survfit object. I apologize in advance for having missed any obvious informational sources but I really didn'...
2014 Jul 02
0
survplot invert number at risk labels
deaR user, I found an unexpected behaviour of the rms::survplot.survfit function, that is giving me inverted labels for the patient-at-risk rows. The problem is that, for some reason, the survival::summary.survfit function changes the order of two of the suvfit object's strata when called (on my dataset) with the times= option (is this another unexpected be...
2011 Aug 25
1
survplot() for cph(): Design vs rms
Hi, in Design package, a plot of survival probability vs. a covariate can be generated by survplot() on a cph object using the folliowing code: n <- 1000 set.seed(731) age <- 50 + 12*rnorm(n) label(age) <- "Age" sex <- factor(sample(c('male','female'), n, TRUE)) cens <- 15*runif(n) h <- .02*exp(.04*(age-50)+.8*(sex=='Female')) dt <- -log(ru...
2011 Apr 30
1
help with a survplot
Dear useRs, I was asked to produce a survival curve like this: http://www.palug.net/Members/jabba/immaginetta.png/view with the cardinality of the riskset at the bottom. I do not like doing it, because it doesn't add any valuable information and because it doesn't discriminate between died and censored. Nevertheless, is there someone able to tell me how to do it? Currently the only
2004 Nov 23
6
Weibull survival regression
...)~ 1, data=lung, dist='weibull') plot (lung.wbs) Returns the error msg: Error in xy.coords(x, y, xlabel, ylabel, log) : x and y lengths differ Using the Design package: lung.wbd <- psm (Surv (futime, status)~ 1, dist="weibull", data=lung, na.action=na.omit) survplot(lung.wbd) Returns the error msg: Error in survplot.Design(lung.wbd) : fit does not have design information Using the eha package (I have not figured out how to get baseline function only, but have used ht=0/1 hypertension as a covariate): lung.wbe <- weibreg (Surv (futime, status)~ ht, y...
2010 Feb 24
0
New version of rms package now on CRAN
Version 2.2-0 of the rms package is now available. This is a somewhat major update. One major change is not downward compatible: Instead of specifying predictor=. or predictor=NA to Predict, summary, nomogram, survplot, gendata, you just specify the name of the predictor. For example, to get predictions for the default range of x1 and for just 2 values of x2 you might specify Predict(fit, x1, x2=c(1,3)). The next major change is the use of lattice graphics in bplot, so that now you can easily make multi-pan...
2005 Dec 20
1
x axis
Hello, I write to know how can I modify the x axis : when I plot a survival object, R plots a graph with x values = 0, 10, 20, 30 while I want a graph with values 0, 6, 12, 18, 24 in the x axis. How can I do this? In R 2.1.1 version there was "time.inc" in survplot, but in version R 2.2.0 there isn't it! I am sorry for my english and I hope that you understand my problem. Thank you Michela ************************************** Dr.ssa Michela Ballardini Unità di Biostatistica e Sperimentazioni Cliniche c/o Osp. Morgagni-Pierantoni - Pad. Valsalva Via...
2009 Feb 02
1
survfit using quantiles to group age
I am using the package Design for survival analysis. I want to plot a simple Kaplan-Meier fit of survival vs. age, with age grouped as quantiles. I can do this: survplot(survfit(Surv(time,status) ~ cut(age,3), data=veteran) but I would like to do something like this: survplot(survfit(Surv(time,status) ~ quantile(age,3), data=veteran) #will not work ideally I would like to superimpose estimates from cph models, which automatically fit the 2nd to 4rth quantile...
2010 Feb 24
0
New version of rms package now on CRAN
Version 2.2-0 of the rms package is now available. This is a somewhat major update. One major change is not downward compatible: Instead of specifying predictor=. or predictor=NA to Predict, summary, nomogram, survplot, gendata, you just specify the name of the predictor. For example, to get predictions for the default range of x1 and for just 2 values of x2 you might specify Predict(fit, x1, x2=c(1,3)). The next major change is the use of lattice graphics in bplot, so that now you can easily make multi-pan...
2012 Sep 05
1
showing ticks for censored data in survfit() in the rms package
...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) # how do you achieve something similar with survplot() survplot(answer) Thanks, Andrew
2008 Dec 16
2
"Dotted lines at the end of the KM-curve"
R-ers! Referees demand that the line in the KM-curve should be changed to dotted at the point where standarerror is <= 10 %. I don't think it's a good habit but I urgently need to implement such a thing in R with survfit, survplot or another program. They also want numbers at risk below the curve Some help, please.... Fredrik ######################## Fredrik Lundgren fredrik.bg.lundgren at gmail.com Engelbrektsgatan 31 582 21 Link?ping tel 013 - 47 30 117 mob 0706 - 86 39 29 Sommarhus: Ljungn?s 158 380 30 Rockneby...
2016 Nov 04
0
Major Update to rms package: 5.0-0
A major new version of the rms package is now on CRAN. The most user-visible changes are: - interactive plotly graphic methods for model fits. The best example of this is survplot for npsurv (Kaplan-Meier) estimates where the number of risk pop up as you hover over the curves, and you can click to bring up confidence bands for differences in survival curves - html methods for model fit summaries especially when using Rmarkdown html notebooks - instead of running print(fit,...
2016 Nov 04
0
Major Update to rms package: 5.0-0
A major new version of the rms package is now on CRAN. The most user-visible changes are: - interactive plotly graphic methods for model fits. The best example of this is survplot for npsurv (Kaplan-Meier) estimates where the number of risk pop up as you hover over the curves, and you can click to bring up confidence bands for differences in survival curves - html methods for model fit summaries especially when using Rmarkdown html notebooks - instead of running print(fit,...
2004 Sep 22
1
Cox proportional hazards model
Good afternoon, I am currently trying to do some work on survival analysis. - I hope to seek your advice re: 2 questions (1 general and 1 specific) (1) I'm trying to do a stratified Cox analysis and subsequently plot(survfit(object)). It seems to work for some strata, but not for others. I have tumor grade, which is a range of 1 - 4. When I divide this range of 1:4 into 2 groups, it