Displaying 20 results from an estimated 200 matches similar to: "Survplot, Y-axis in percent"
2012 Nov 27
4
Fitting and plotting a coxph with survfit, package(surv)
Hi Dear R-users
I have a database with 18000 observations and 20 variables. I am running
cox regression on five variables and trying to use survfit to plot the
survival based on a specific variable without success.
Lets say I have the following coxph:
>library(survival)
>fit <- coxph(Surv(futime, fustat) ~ age + rx, data = ovarian)
>fit
what I am trying to do is plot a survival
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,
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 Jul 21
1
Design Survplot performance
Hi,
I have a Cox PH model that's large for my server, 120K rows, ~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,
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
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"
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
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 <-
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 behaviour?). survplot takes
the
2004 Nov 23
6
Weibull survival regression
Dear R users,
Please can you help me with a relatively straightforward problem that I
am struggling with? I am simply trying to plot a baseline survivor and
hazard function for a simple data set of lung cancer survival where
`futime' is follow up time in months and status is 1=dead and 0=alive.
Using the survival package:
lung.wbs <- survreg( Surv(futime, status)~ 1, data=lung,
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
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
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
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)
2009 Feb 20
1
log-minus-log plot
Dear experts,
I would like to know how to plot the log-minus-log plot for survival
analysis (to check the proportional assumption) in R.
Using the AML example.
fit <- survfit(Surv(time, status) ~ x, data=aml)
length(fit$surv) #20
as the length of fit$surv is shorter than aml$x and aml$time. I don't
know how to plot.
Thank you.
Regards,
CH
--
CH Chan
Research Assistant - KWH
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
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
2010 Nov 18
3
Plotting number of patients at risk below survival curve
Dear list,
does anyone know of a R-package that has implemented the increasingly popular
inclusion of the number of patients at risk below Kaplan-Meier curves like in
http://bloodjournal.hematologylibrary.org/content/vol116/issue19/images/large/zh89991058760001.jpeg
any hint (or negative answer) is much appreciated.
Thanks
Thorsten
--
Thorsten Raff
2nd Medical Department,
University
2009 Apr 14
1
Function call error in cph/survest (package Design)
Dear UseR,
I do not know if this a problem with me, my data or cph/survest in package
design. The example below works with a standard data set, but not with my
data, but I cannot locate the problem.
Note that I am using an older package of survival to avoid a problem with
the newly renamed function in survival meeting Design.
Dieter
# First, check standard example to make sure
library(Design)