Displaying 20 results from an estimated 5000 matches similar to: "Problem using pkg "survival""
2006 Jan 20
3
command in survival package
Hi there,
I have a question about one command sentence when I follow the example
in the book of "Survival analysis in S":
> aml1<-aml[aml$group==1]
but I got the error warning: NULL data frame with 23 rows
Thus, I couldn't keep going on the next command:
esf.fit<-survfit(Surv(aml1,status)~1).
and also when I try
> aml1<-aml[aml$group==1,]
2006 May 05
2
How to access results of survival analysis
Hi List,
A friend of mine recently asked the same question as Heinz T?chler. Since
I've already written the code I'd like to share with the list.
# x is an object returned by "survfit";
# "smed" returns a matrix of 5 columns of
# n, events, median, 0.95LCL, 0.95UCL.
# The matrix returned has rownames as the
# group labels (eg., treatment arms) if any.
smed <-
2015 Dec 07
2
Tiempo de vida
Los datos no son de desgaste de cuchilla, sino de consumo de las mismas.
Por ello tengo los datos de la siguiente forma:
Unidades cambiadas Fecha
En unidades cambiadas, suele ser una y en fecha el dia que se hizo el cmabio.
Con eso no se muy bien como estructurar los datos para hacer el análisis.
Gracias
Jesús
> Date: Mon, 7 Dec 2015 16:27:18 +0100
> From: griera en yandex.com
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 Nov 06
1
Survival Plot in R 2.10.0
I would like to produce a complimentary log-log survival plot with
only the points appearing on the graph. I am using the code below,
taken from the plot.survfit page of help for the the survival package
(version 2.35-7).
I am running in R 2.10.0 on Windows XP, and the list of packages
following
the error is loaded. Is there some specific 'type= ' syntax, or an
additional parameter
that
2004 Apr 21
1
Boot package
Dear mailing list,
I tried to run the example for the conditional bootstap written in the help file
of censboot. I got the following result:
STRATIFIED CONDITIONAL BOOTSTRAP FOR CENSORED DATA
Call:
censboot(data = aml, statistic = aml.fun, R = 499, F.surv = aml.s1,
G.surv = aml.s2, strata = aml$group, sim = "cond")
Bootstrap Statistics :
original bias std. error
t1*
2009 Feb 17
3
Survival-Analysis: How to get numerical values from survfit (and not just a plot)?
Hi!
I came across R just a few days ago since I was looking for a toolbox
for cox-regression.
I?ve read
"Cox Proportional-Hazards Regression for Survival Data
Appendix to An R and S-PLUS Companion to Applied Regression" from John Fox.
As described therein plotting survival-functions works well
(plot(survfit(model))). But I?d like to do some manipulation with the
survival-functions
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 |
2015 Dec 08
2
Tiempo de vida
Pero como haría el data frame?? Porque las cuchillas son de la misma referencia. En realidad es para ver cada cuanto se gstan las cuchillas y ver que pedidos hay que hacer de las mismas.
La tabla que tengo es:
25 enero-> 1 cuchilla gastada
30 enero -> 1 cuchilla gastada
3 de febrero -> 2 cuchillas gastadas
5 de febrero -> 1 cuchilla gastada
Y así....
No tiene necesariamente que ser
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
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
2008 Mar 13
1
survival curve for only certain values of a factor
Hello:
Using the built-in dataset aml as an example:
data(aml)
If I use instead dummy variables:
aml$x1 = (aml$x=="maintained")aml$x2 = (aml$x=="unmaintained")
and I want to plot the survival curve using x1, x2, and I just want the 2 levels, rather than 4 curves from:
fit <- survfit(Surv(time, status) ~ x1+x2, data=aml)
plot(fit)
I guess because there are 2 levels
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)
2009 Jan 14
2
Kaplan-Meier Plot
dear all,
I want to plot a kaplan Meier plot with the following functions, but I fail
to produce the plot I want:
library(survival)
tim <- (1:50)/6
ind <- runif(50)
ind[ind > 0.5] <- 1; ind[ind < 0.5] <- 0;
MS <- runif(50)
pred <- vector()
pred[MS < 0.3] <- 0; pred[MS >= 0.3] <- 1
df <- as.data.frame(cbind(MS, tim, pred, ind))
names(df) <-
2015 Dec 10
2
Tiempo de vida
Hola Jesús,
La respuesta, desde mi punto de vista, es un poco off-topic de lo que se
trata en esta lista, pero comento como lo veo yo.
Con el nivel de detalle que tienes, puedes hacer varias cosas:
- Simplemente mantén en tu almacén un número de cuchillas mayor que la
última vez que tuviste que pedirlas con urgencia. En los entornos de
Producción, efectivamente el que rompas el stock
2006 Dec 13
1
Passing arguments to panels in trellis plots
Dear all,
I am trying to produce survfit plots in a trellis environment and I
would like the plots to be logarithmic.
I am trying this:
print(Ecdf(~time | size*type, groups=alg,data=B,subscripts=TRUE,
panel=function(x,groups,subscripts)
{
t <- survfit(Surv(time[subscripts],event[subscripts])~groups[subscripts],data=B)
2006 Jun 10
1
Calculating survival for set time intervals
Hello friends and fellow R users,
I have successfully tabulated and entered my survival data into R and
have generated survival curves. But I would like to be able to determine
what the survival rates are now at one month, three months, six months
and one year.
I have a data set, via.wall, which I have entered into R, and which
generates the following Surv object:
Surv(Days,Status==1)
[1]
2003 Jan 16
1
help drawing kaplan-meier plot starting from 0
Dear help news reader,
I'm trying to draw a Kaplan-Meier curve and would like to ask the news
group for some help
Supposing I have study comapring two drugs, "A", and "B" and I recorde the
time to get to the clinical endpoint (Time), in my case becommming virus free.
I have setup the following frame:
Time c Drug
1 5 1 A
2 7 1 B
3 2 1 A
4 10 1
2020 Sep 29
5
2 KM curves on the same plot
Hello,
Can anyone suggest a simple way to generate a Kaplan-Meier plot with 2 survfit objects, just like this one:?
https://drive.google.com/file/d/1fEcpdIdE2xYtA6LBQN9ck3JkL6-goabX/view?usp=sharing
Suppose I have 2 survfit objects: fit1 is for the curve on the left (survtime has been truncated to the cutoff line: year 5), fit2 is for the curve on the right (minimum survival time is at the
2009 Mar 05
1
RV: help
Dear Sirs,
I want to estimate the survival mean of a few specific teams. I'm trying to
calculate it through a Kaplan Meier estimator. For doing so, I load the
"survival" package and run the following instructions:
"options(survfit.print.mean=TRUE)" allows showing the mean and mean
standard error
"KM=survfit(Surv(Dias,Censura))"