Displaying 20 results from an estimated 7000 matches similar to: "showing ticks for censored data in survfit() in the rms package"
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) <- "Age"
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
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,
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 <-
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
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
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
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't find anything in the
2011 Oct 11
1
restricted cubic spline within survfit.cph in the package rms
Hello,
does anyone have an example on how to use restricted cubic
splines function rcs within survfit.cph, if cph (Cox Proportional Hazard Regression) was done with restricted cubic
splines (which I made to work)?
Thank you.
>
[[alternative HTML version deleted]]
2013 Apr 19
2
NAMESPACE and imports
I am cleaning up the rms package to not export functions not to be called
directly by users. rms uses generic functions defined in other packages.
For example there is a latex method in the Hmisc package, and rms has a
latex method for objects of class "anova.rms" so there are anova.rms and
latex.anova.rms functions in rms. I use:
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,
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,
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 to the x-axis tick marks not the survival
curve time of
2011 Mar 01
0
Major update to rms package
A new version of rms is now available on CRAN for Linux and Windows (Mac
will probably be available very soon). Largest changes include latex
methods for validate.* and adding the capability to force a subset of
variables to be included in all backwards stepdown models (single model or
validation by resampling).
Recent updates:
* In survplot.rms, fixed bug (curves were undefined if
2011 Mar 01
0
Major update to rms package
A new version of rms is now available on CRAN for Linux and Windows (Mac
will probably be available very soon). Largest changes include latex
methods for validate.* and adding the capability to force a subset of
variables to be included in all backwards stepdown models (single model or
validation by resampling).
Recent updates:
* In survplot.rms, fixed bug (curves were undefined if
2011 Jun 03
0
New version of rms package on CRAN
rms version 3.3-1 has been installed on CRAN. New features/bug fixes are
below.
* Added new example for anova.rms for making dot plots of partial R^2
of predictors
* Defined logLik.ols (calls logLik.lm)
* Fixed and cleaned up logLik.rms, AIC.rms
* Fixed residuals.psm to allow other type= values used by
residuals.survreg
* Fixed Predict and survplot.rms to allow for case
2010 Sep 13
0
New version of rms package on CRAN
CRAN has a significant update to rms. Windows and unix/linux versions
are available and I expect the Mac version to be available soon.
The most significant improvement is addition of latex=TRUE
arguments to model fitting print methods, made especially for use
with Sweave.
Here is a summary of changes since the previous version.
Changes in version 3.1-0 (2010-09-12)
* Fixed gIndex to not
2010 Sep 13
0
New version of rms package on CRAN
CRAN has a significant update to rms. Windows and unix/linux versions
are available and I expect the Mac version to be available soon.
The most significant improvement is addition of latex=TRUE
arguments to model fitting print methods, made especially for use
with Sweave.
Here is a summary of changes since the previous version.
Changes in version 3.1-0 (2010-09-12)
* Fixed gIndex to not
2006 Dec 29
2
Survfit with a coxph object
I am fitting a coxph model on a large dataset (approx 100,000 patients), and
then trying to estimate the survival curves for several new patients based
on the coxph object using survfit. When I run coxph I get the coxph object
back fairly quickly however when I try to run survfit it does not come
back. I am wondering if their is a more efficient way to get predicted
survival curves from a coxph
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