Displaying 20 results from an estimated 3000 matches similar to: "Adjusted survival curves"
2017 Oct 09
0
Adjusted survival curves
Adjusted survival curves (Thanks to sample code: https://rpubs.com/daspringate/survival )
Thanks to Moderator/Admin's Great Work! For a successful solution I used advice that could be understood:
1. Peter Dalgaard: The code does not work, because the covariates are not factors.
2. Jeff Newmiller: "Change the columns into factors before you give them to the coxph function, e.g.
2017 Oct 07
2
Adjusted survival curves
For adjusted survival curves I took the sample code from here:
https://rpubs.com/daspringate/survival
and adapted for my date, but got error.
I would like to understand what is my mistake. Thanks!
#ADAPTATION FOR MY DATA
library(survival)
library(survminer)
df<-read.csv("F:/R/data/base.csv", header = TRUE, sep = ";")
head(df)
ID start stop censor sex age stage treatment
1
2017 Oct 07
2
Adjusted survival curves
For adjusted survival curves I took the sample code from here:
https://rpubs.com/daspringate/survival
and adapted for my date, but ... have a QUESTION.
library(survival)
library(survminer)
df<-read.csv("base.csv", header = TRUE, sep = ";")
head(df)
ID start stop censor sex age stage treatment
1 1 0 66 0 2 1 3 1
2 2 0 18 0 1 2 4 2
3 3 0 43 1 2 3 3 1
4 4 0 47 1 2 3 NA 2
5 5
2004 Apr 21
1
difference between coxph and cph
Hi. I am using Windows version of R 1.8.1. Being somewhat new to survival
analysis, I am trying to compare cph (Design) with coxph (survival) for use
with a survival data set.
I was wondering why cph and coxph provide me with different confidence
intervals
for the hazard ratios for one of the variables. I was wondering if I am
doing something wrong? Or if the two functions are calculating hazard
2011 Sep 26
3
survival analysis: interval censored data
hello:
my data looks like:
time1 time2 event catagoria
2004 2006 1 C
2004 2005 0 C
2005 2010 1 E
2007 2009 1 C
2006 2007 0 E
2008 2010 0 C
2008 2010 1 E
...
and the census interval is 1 year
I have tried this
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
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.
>>
2007 Dec 31
3
Survival analysis with no events in one treatment group
I'm trying to fit a Cox proportional hazards model to some hospital
admission data. About 25% of the patients have had at least one
admission, and of these, 40% have had two admissions within the 12
month period of the study. Each patients has had one of 4
treatments, and one of the treatment groups has had no admissions for
the period. I used:
2004 Jan 07
2
Survival, Kaplan-Meier, left truncation
Dear all,
I have data from 1970 to 1990 for people above age 50.
Now I want to calculate survival curves by age starting at age 50 using the
Kaplan Meier Estimator.
The problem I have is that there are already people in 1970 who are older
than 50 years.
I guess this is called delayed entry or left truncation (?).
I thought the code would be:
roland <- survfit(Surv(time=age.enter,
2008 Dec 04
1
comparing SAS and R survival analysis with time-dependent covariates
Dear R-help,
I was comparing SAS (I do not know what version it is) and R (version
2.6.0 (2007-10-03) on Linux) survival analyses with time-dependent
covariates. The results differed significantly so I tried to understand
on a short example where I went wrong. The following example shows that
even when argument 'method' in R function coxph and argument 'ties' in
SAS procedure
2011 Apr 10
1
survival object
Hi All,
I am trying to do a survivorship analysis with library(survival)from a data
set that looks like this:
I followed a bunch of naturally germinated seedlings of an annual plant from
germination to death (none made it to reproduce, and died in a period of ~60
days after germination.)
I also know the size of the seed of every individual censused. So I am
trying to analyze seedling survival as
2013 Jan 24
0
Royston Parmar adjusted survival curves using flexsurv
Dear R
I am trying to understand and use the flexible parametric survival model
suggested by Royston and Parmar.
However I am stuck trying to plot the adjusted survival curves for
different covariates in the following code:
library(flexsurv)
library(graphics)
spl <- flexsurvspline(Surv(futime, fustat) ~ rx+ecog.ps+resid.ds+age, data
= ovarian, k=2, scale="odds")
spl
the code
2009 Dec 18
2
Covariate adjusted survival curves
Hello,
We are using frailty models to estimate risk of one year death. Is there a
way to generate survival curves adjusted for covariates and also include
frailty term?
Any help will be much appreciated!
Thanks!
LV
[[alternative HTML version deleted]]
2024 May 15
2
Extracting values from Surv function in survival package
OS X
R 4.3.3
Colleagues
I have created objects using the Surv function in the survival package:
> FIT.1
Call: survfit(formula = FORMULA1)
n events median 0.95LCL 0.95UCL
SUBDATA$ARM=1, SUBDATA[, EXP.STRAT]=0 18 13 345 156 NA
SUBDATA$ARM=2, SUBDATA[, EXP.STRAT]=1 13 5 NA 186 NA
SUBDATA$ARM=2, SUBDATA[, EXP.STRAT]=2 5
2010 Jan 12
0
Wishlist: Function 'difftime' to honor 'tzone' attribute (PR#14182)
Full_Name: Suharto Anggono
Version: 2.8.1
OS: Windows
Submission from: (NULL) (125.165.84.118)
PR#14076 inspired me to write this.
> t1 <- as.POSIXct("1970-01-01 00:00:00", tz="GMT")
> t2 <- as.POSIXlt("1970-01-01 00:00:00", tz="GMT")
> t1 - t2
Time difference of 7 hours
Above, t1 and t2 represent the same time in the same specified
2007 May 07
1
Predicted Cox survival curves - factor coding problems..
The combination of survfit, coxph, and factors is getting confused. It is
not smart enough to match a new data frame that contains a numeric for sitenew
to a fit that contained that variable as a factor. (Perhaps it should be smart
enough to at least die gracefully -- but it's not).
The simple solution is to not use factors.
site1 <- 1*(coxsnps$sitenew==1)
site2 <-
2010 Nov 15
3
merge two dataset and replace missing by 0
Hi r users,
I have two data sets (X1, X2). For example,
time1<-c( 0, 8, 15, 22, 43, 64, 85, 106, 127, 148, 169, 190 ,211 )
outpue1<-c(171 ,164 ,150 ,141 ,109 , 73 , 47 ,26 ,15 ,12 ,6 ,2 ,1 )
X1<-cbind(time1,outpue1)
time2<-c( 0 ,8 ,15 , 22 ,43 , 64 ,85 ,106 ,148)
output2<-c( 5 ,5 ,4 ,5 ,5 ,4 ,1 ,2 , 1 )
X2<-cbind(time2,output2)
I want to
2009 Jun 29
2
Add ID numbers on a plot
Dear List,
I have (for example) 50 observations collected from 50 experimental sites and want to look at changes of 50 observations as function of time in a graph. I found that I could do that using R-code below:
time2 <- 1:25
y1=rnorm(25, mean=0, sd=1)
y2=rnorm(25, mean=0, sd=1)
...
y50=rnorm(25, mean=2, sd=1)
plot(time2, y1, type='b', xlim=range(0,30), ylim=range(y1, y2),
2009 May 15
1
Function Surv and interpretation
Dear everyone,
My question involves the use of the survival object.
We can have
Surv(time,time2,event, type=, origin = 0) (1)
As detailed on p.65 of:
http://cran.r-project.org/web/packages/survival/survival.pdf
My data (used in my study) is 'right censored' i.e. my variable corresponding to 'event' indicates whether a person is alive (0) or dead (1) at date last seen