Displaying 20 results from an estimated 1000 matches similar to: "Survival analysis and comparing survival curves"
2008 Dec 04
1
Comparing survival curves with "survdiff" "strata" help
ExpeRts,
I'm trying to compare three survival curves using the function "survdiff" in the survival package. Following is my code and corresponding error message.
> survdiff(Surv(st_months, status) ~ strata(BOR), data=mydata)
Error in survdiff(Surv(st_months, status) ~ strata(BOR), data = mydata) :
No groups to test
When I check the "strata" of the variable. I get .
2011 Jun 28
2
coxph() - unexpected result using Crawley's seedlings data (The R Book)
Hi,
I ran the example on pp. 799-800 from Machael Crawley's "The R Book" using package survival v. 2.36-5, R 2.13.0 and RStudio 0.94.83. The model is a Cox's Proportional Hazards model. The result was quite different compared to the R Book. I have compared my code to the code in the book but can not find any differences in the function call. My results are attached as well as a
2012 Jan 26
2
extracting from data.frames for survival analysis
Hi,
I have a data frame:
> class(B27.vec)
[1] "data.frame"
> head(B27.vec)
AGE Gend B27 AgeOn DD uveitis psoriasis IBD CD UC InI BASDAI BASFI Smok UV
1 57 1 1 19 38 2 1 1 1 1 1 5.40 8.08 NA 1
2 35 1 1 33 2 2 1 1 1 1 1 1.69 2.28 NA 1
3 49 2 1 40 9 1 1 1 1 1 1 8.30 9.40 NA
2013 Apr 29
3
Comparing two different 'survival' events for the same subject using survdiff?
I have a dataset which for the sake of simplicity has two endpoints. We would like to test if two different end-points have the same eventual meaning. To try and take an example that people might understand better:
Lets assume we had a group of subjects who all received a treatment. The could stop treatment for any reason (side effects, treatment stops working etc). Getting that data is very
2010 Jul 07
1
Appropriateness of survdiff {survival} for non-censored data
I read through Harrington and Fleming (1982) but it is beyond my
statistical comprehension. I have survival data for insects that have
a very finite expiration date. I'm trying to test for differences in
survival distributions between different groups. I understand that
the medical field is most often dealing with censored data and that
survival analysis, at least in the package survival,
2012 Oct 19
2
Question about survdiff in for-loop.
Hi everyone!!
I have dataset composed of a numbers of survival analyses.
( for batch survival analyses by using for-loop) .
Here are code !!
#######
dim(svsv)
Num_t<-dim(svsv)
Num<-Num_t[2] # These are predictors !!
names=colnames(svsv)
for (i in 1:Num )
{
name_tt=names[i]
survdiff(Surv(survival.m, survival) ~ names[i], data=svsv)
fit.Group<-survfit(Surv(survival.m, survival) ~
2007 May 16
2
log rank test p value
How can I get the Log - Rank p value to be output?
The chi square value can be output, so I was thinking if I can also have the
degrees of freedom output I could generate the p value, but can't see how to
find df either.
> (survtest <- survdiff(Surv(time, cens) ~ group, data = surv,rho=0))
Call:
survdiff(formula = Surv(time, cens) ~ group, data = surv, rho = 0)
N Observed
2018 Feb 15
0
Fleming-Harrington weighted log rank test
> On Feb 13, 2018, at 4:02 PM, array chip via R-help <r-help at r-project.org> wrote:
>
> Hi all,
>
> The survdiff() from survival package has an argument "rho" that implements Fleming-Harrington weighted long rank test.
>
> But according to several sources including "survminer" package
2018 Feb 15
1
Fleming-Harrington weighted log rank test
> On Feb 14, 2018, at 5:26 PM, David Winsemius <dwinsemius at comcast.net> wrote:
>
>>
>> On Feb 13, 2018, at 4:02 PM, array chip via R-help <r-help at r-project.org> wrote:
>>
>> Hi all,
>>
>> The survdiff() from survival package has an argument "rho" that implements Fleming-Harrington weighted long rank test.
>>
2001 Nov 22
1
p-value using survdiff
Dear all,
Does anyone knows how I could extract the p-value in:
> survdiff(Surv(tempo,status) ~ grupo,data=dados1,rho=1)
Call:
survdiff(formula = Surv(tempo, status) ~ grupo, data = dados1, rho = 1)
N Observed Expected (O-E)^2/E (O-E)^2/V
grupo=1 21 5.12 12.00 3.94 14.5
grupo=2 21 14.55 7.68 6.16 14.5
Chisq= 14.5 on 1 degrees of freedom,
2018 Feb 14
2
Fleming-Harrington weighted log rank test
Hi all,?
The survdiff() from survival package has an argument "rho" that implements Fleming-Harrington weighted long rank test.?
But according to several sources including "survminer" package (https://cran.r-project.org/web/packages/survminer/vignettes/Specifiying_weights_in_log-rank_comparisons.html), Fleming-Harrington weighted log-rank test should have 2 parameters
2009 Sep 16
2
Teasing out logrank differences *between* groups using survdiff or something else?
R Folk:
Please forgive what I'm sure is a fairly na?ve question; I hope it's clear.
A colleague and I have been doing a really simple one-off survival analysis,
but this is an area with which we are not very familiar, we just happen to
have gathered some data that needs this type of analysis. We've done quite
a bit of reading, but answers escape us, even though the question below
2012 Oct 18
1
looping survdiff?
Hello,
I am trying to set up a loop that can run the survdiff function with the
ultimate goal to generate a csv file with the p-values reported. However,
whenever I try a loop I get an error such as "invalid type (list) for
variable 'survival_data_variables[i]".
This is a subset of my data:
structure(list(time = c(1.51666666666667, 72, 72, 25.7833333333333,
72, 72, 72, 72, 72,
2008 Jul 26
1
issues with gap.plot function
Dear all:
I have the following codes:
Xdata<-c(2,3,8,9,10)
Ydata<-1:5
gap.plot(Xdata, Ydata,gap=c(5,6),gap.axis="x",type="o")
However, the type='o' seems only work on the first part of gap plot, the second half of the plot always just points, you can not add lines on that part, any help will be highly appreciated. I would like to have these two parts of
2012 Oct 19
1
Looping survdiff
The number of recent questions from umn.edu makes me wonder if there's homework involved....
Simpler for your example is to use get and subset.
dat <- structure(..... as found below
var.to.test <- names(dat)[4:6] #variables of interest
nvar <- length(var.to.test)
chisq <- double(nvar)
for (i in 1:nvar) {
tfit <- survdiff(Surv(time, completion==2) ~
2007 Apr 26
2
Extract p-value from survdiff function
Hi list,
I want to use the p-value from the survdiff function (package
survival) to reuse within a function in a Kaplan-Meier plot. The
p-value is somehow not a component of the value list ?!
Thanks in advance
--
A. Goralczyk
G?ttingen, Ger.
2016 Aug 11
3
Comparación de probabilidades de supervivencia en R
Estimados miembros de la lista,
Estoy haciendo una análisis de supervivencia con R. Adjunto mis datos.
Quiero analizar la supervivencia de 5 grupos diferentes y compararla. Para
ello estoy utilizando el paquete survival.
> s = Surv(c$tiempo, c$estado)
> f = survfit(s ~ tratamiento, data = c)
> d = survdiff(s ~ tratamiento, data = c)
> d
Call:
survdiff(formula = s ~ tratamiento,
2004 Sep 28
2
Validating a Cox model on an external set
Good morning,
Sorry to trouble the list.
I have a problem I hope to seek your advice on.
Essentially, I am trying to 'validate' a multivariate Cox proportional
hazards model built in a training set, by testing it on an external
test set. I have performed a survfit using the Cox model to predict
survival for the test set, and obtained individual predictions for
survival time, with
2012 Jan 10
1
Lapack routine dgesv: system is exactly singular
Hi
I have a problem with this error, I have searched the archives and found
previous discussion about this, can I cannot understand how the explanations
apply to what I am trying to do.
I am trying to do Log_rank Survival analysis, I have included tables and str
command, is it a factor/integer problem? If so how do I correct this, as all
my attempt to recode the data have failed.
>
2018 Mar 05
2
backquotes and term.labels
A user reported a problem with the survdiff function and the use of variables that contain
a space.? Here is a simple example.? The same issue occurs in survfit for the same reason.
lung2 <- lung
names(lung2)[1] <- "in st"?? # old name is inst
survdiff(Surv(time, status) ~ `in st`, data=lung2)
Error in `[.data.frame`(m, ll) : undefined columns selected
In the body of the code