[R] Survival questions

2023-07-26 Thread Stats Student
Hi - I am using the survfit() function to produce Kaplan-Meier survival curves for several different groups. survfit (Surv() ~ cohort, data=d) Everything works fine, but I'd like to do something different. I have a 12 month survival curve (base) and I also have two survival curves based on some

Re: [R] Survival Object - is 12month survival = 365days

2020-09-04 Thread POLWART, Calum (SOUTH TEES HOSPITALS NHS FOUNDATION TRUST) via R-help
www.9folders.com/> From: Marc Schwartz Sent: Friday, 4 September 2020 18:32 To: POLWART, Calum (SOUTH TEES HOSPITALS NHS FOUNDATION TRUST) Cc: R-help; Terry Therneau Subject: Re: [R] Survival Object - is 12month survival = 365days On Sep 4, 2020, at 11:45 AM, POLWART,

Re: [R] Survival Object - is 12month survival = 365days

2020-09-04 Thread Marc Schwartz via R-help
On Sep 4, 2020, at 11:45 AM, POLWART, Calum (SOUTH TEES HOSPITALS NHS FOUNDATION TRUST) via R-help wrote: > > Using survfit I can get the '1 year' Survival from this dataset which holds > survival in days: > > require (survival) > survfit( Surv(time, status) ~sex, data=colon) > summary (fit, 3

[R] Survival Object - is 12month survival = 365days

2020-09-04 Thread POLWART, Calum (SOUTH TEES HOSPITALS NHS FOUNDATION TRUST) via R-help
Using survfit I can get the '1 year' Survival from this dataset which holds survival in days: require (survival) survfit( Surv(time, status) ~sex, data=colon) summary (fit, 365) My current real world data I'm calculating time using lubridate to calculate time and since it made the axis easy I j

Re: [R] survival anaylsis with tabulated data

2020-05-21 Thread John Kane
; > From: Ergin Artun > Sent: Thursday, May 21, 2020 3:08 PM > To: PIKAL Petr > Subject: Re: [R] survival anaylsis with tabulated data > > Dear Pical, > I'm also not an expert and had a typo error while translating colum names > at code. > > At my data set

Re: [R] survival anaylsis with tabulated data

2020-05-21 Thread PIKAL Petr
t knowing details I wonder if anybody is able to help you. Cheers Petr From: Ergin Artun Sent: Thursday, May 21, 2020 3:08 PM To: PIKAL Petr Subject: Re: [R] survival anaylsis with tabulated data Dear Pical, I'm also not an expert and had a typo error while translating colum names at cod

Re: [R] survival anaylsis with tabulated data

2020-05-21 Thread PIKAL Petr
or not properly structured data. This is plain text mail list, please do not use HTML formating. Cheers Petr > -Original Message- > From: R-help On Behalf Of Ergin Artun > Sent: Wednesday, May 20, 2020 2:01 PM > To: r-help@r-project.org > Subject: [R] survival anaylsis

[R] survival anaylsis with tabulated data

2020-05-20 Thread Ergin Artun
Dear R Friends, I'm a medical doctor with some knowledge about statistic and programming. I want to analysis and compare data of different countries with survival or popEpi tools in R. I couldn't able to make tables with one row for every people of countries without illness. I can made a data ta

Re: [R] Survival analysis

2020-04-26 Thread Medic
cpolwart wrote: > the event can only happen once > 1. Yes, I'm not interested in repeat events. 2. I just had an interest in learning the code for survival analysis in case there are: event, left censored (not left truncating) and right censored, nothing more! But I no longer want to burden anyone

Re: [R] Survival analysis

2020-04-26 Thread cpolwart
On 2020-04-26 10:48, Medic wrote: Very grateful for the all comments! My data contains: • left censored • right censored • events (interval censored does not contain!) (P.S. I understood, that the code with "type = 'left'" is not suitable, because is ONLY for left-censored.) I wanted to get th

Re: [R] Survival analysis

2020-04-26 Thread Medic
Very grateful for the all comments! My data contains: • left censored • right censored • events (interval censored does not contain!) (P.S. I understood, that the code with "type = 'left'" is not suitable, because is ONLY for left-censored.) I wanted to get the appropriate code for my so mix dat

Re: [R] Survival analysis

2020-04-21 Thread Göran Broström
Dear dr Medic, Den 2020-04-17 kl. 23:03, skrev Medic: On 2020-04-17 20:06, Medic wrote: I can't understand how to do a survival analysis (?Surv ()) when some event occurred before the start of observation (left censored). If I understand correctly, there are two methods. I chose a method with:

Re: [R] Survival analysis

2020-04-17 Thread Medic
On 2020-04-17 20:06, Medic wrote: > I can't understand how to do a survival analysis (?Surv ()) when some > event occurred before the start of observation (left censored). If I > understand correctly, there are two methods. I chose a method with: 1) > time from the start of treatment to the event a

Re: [R] Survival analysis

2020-04-17 Thread cpolwart
On 2020-04-17 20:06, Medic wrote: I can't understand how to do a survival analysis (?Surv ()) when some event occurred before the start of observation (left censored). If I understand correctly, there are two methods. I chose a method with: 1) time from the start of treatment to the event and 2)

[R] Survival analysis

2020-04-17 Thread Medic
I can't understand how to do a survival analysis (?Surv ()) when some event occurred before the start of observation (left censored). If I understand correctly, there are two methods. I chose a method with: 1) time from the start of treatment to the event and 2) the indicator of the event. I did (i

[R] survival::clogit - how to construct data and use sampling weights

2020-01-20 Thread Valerio Leone Sciabolazza
Dear list users, I need some guidelines to run a conditional logistic regression with fixed effects. Let me give you some background. I have a survey where each respondent is asked the same question once a year for three consecutive years. There is no apriori on the extent to which choice at time

[R] survival::survfit.coxph confidence vs prediction intervals r-help x

2018-12-04 Thread Gad Abraham
Dear list, I'm trying to understand what kind of uncertainty intervals are plotted for survival::survfit.coxph when 'conf.int=TRUE' is called, e.g.: f <- coxph(Surv(futime, fustat) ~ age, data = ovarian) s <- survfit(f, newdata=data.frame(age=c(30, 60))) plot(s, conf.int=TRUE) Are these bands th

[R] survival::survfit.coxph confidence vs prediction intervals

2018-12-03 Thread Gad Abraham
Dear list, I'm trying to understand what kind of uncertainty intervals are plotted for survival::survfit.coxph when 'conf.int=TRUE' is called, e.g.: f <- coxph(Surv(futime, fustat) ~ age, data = ovarian) s <- survfit(f, newdata=data.frame(age=c(30, 60))) plot(s, conf.int=TRUE) Are these bands th

Re: [R] survival analysis question

2018-10-31 Thread rsubscribe . via R-help
Thank You,Eric. I run this code without id="id" and it worked! Eric Berger :    Medic via  R - help  < r - help @ r -project.org > wrote: addicts.cp=survSplit(addicts, cut=addicts$survt[addicts$status==1], > end="survt", event="status",start="start", id="id") >ERROR in survSplit(addicts, cut

Re: [R] survival analysis question

2018-10-31 Thread Eric Berger
You need to read the Help page for the function survSplit ?survSplit states that the id argument is a "character string with the name of new id variable to create (optional). This can be useful if the data set does not already contain an identifier" The addicts data.frame has as its first column

[R] survival analysis question

2018-10-31 Thread Medic via R-help
When I run the code from the book Kleinbaum "Survival analysis" (7. Running an extended cox model. Page 646) I got an ERROR. What do you think is the reason? I attach a file with few lines of dataset "addicts-dput.r". > library(cmprsk) > addicts = read.csv ("addicts.csv")     id clinic status su

Re: [R] Survival model error

2017-11-06 Thread David Winsemius
> On Nov 6, 2017, at 5:45 AM, Meghna Govil wrote: > > Thanks David. Could you show me how to do that in my example ? Possibly: kmsurvival_np <- survfit(Surv( tte, censored) ~ . , data=train1_na) I say "possibly" because I don't know whether all the columns of `train1_na` were included in th

Re: [R] Survival model error

2017-11-06 Thread Michael Dewey
Try putting your data.frame (train_na) as argument to the data= parameter and then in the formula put the actual variable names but without the train_na$ prefix. On 06/11/2017 13:45, Meghna Govil via R-help wrote: Thanks David. Could you show me how to do that in my example ? Thanks, Meghna

Re: [R] Survival model error

2017-11-06 Thread Meghna Govil via R-help
Thanks David. Could you show me how to do that in my example ? Thanks, Meghna > On Nov 6, 2017, at 12:58 AM, David Winsemius wrote: > > You should stop trying to use matrices on the RHS and using separate vectors > to Surv. Instead use a data argument and have the names in your formula refer

Re: [R] Survival model error

2017-11-05 Thread David Winsemius
You should stop trying to use matrices on the RHS and using separate vectors to Surv. Instead use a data argument and have the names in your formula refer to column names. — David Sent from my iPhone > On Nov 5, 2017, at 7:21 PM, Meghna Govil via R-help > wrote: > > > Hi - Below is my co

[R] Survival model error

2017-11-05 Thread Meghna Govil via R-help
Hi - Below is my code and then the error when I run the last line. time_np <- train1_na$tte event_np <- train1_na$censored X_np <- cbind( train1_na$AMT, train1_na$DISCOUNT_AMT, train1_na$high_price_pcnt, train1_na$EM_RECEIVED, train1_na$DM_RECEIVED, train1_na$TXN_WITH_RINGCODE,

Re: [R] survival analysis - predict function

2017-10-16 Thread David Winsemius
> On Oct 16, 2017, at 8:28 AM, Meghna Govil wrote: > > Hi > > I'm trying to predict the values for a survreg object called > loglogistic_na. Here is the definition of loglogistic_na and following that > the syntax used for the predict function. But upon execution I don't get > any output. Not s

[R] survival analysis - predict function

2017-10-16 Thread Meghna Govil via R-help
> Hi > > I'm trying to predict the values for a survreg object called loglogistic_na. > Here is the definition of loglogistic_na and following that the syntax used > for the predict function. But upon execution I don't get any output. Not sure > what I'm doing wrong: > > loglogistic_na <- sur

[R] survival analysis - predict function

2017-10-16 Thread Meghna Govil
Hi I'm trying to predict the values for a survreg object called loglogistic_na. Here is the definition of loglogistic_na and following that the syntax used for the predict function. But upon execution I don't get any output. Not sure what I'm doing wrong: loglogistic_na <- survreg(Surv(time_na,ev

Re: [R] survival package can't find Ccoxfit6

2017-05-01 Thread SeshanV
, Venkat -Original Message- From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] Sent: Friday, April 28, 2017 6:46 PM To: Henric Winell; Therneau, Terry M., Ph.D.; R-help Cc: Seshan, Venkatraman E./Epidemiology-Biostatistics Subject: Re: [R] survival package can't find Ccoxfit6 On

Re: [R] survival package can't find Ccoxfit6

2017-04-28 Thread Duncan Murdoch
On 28/04/2017 5:37 PM, Henric Winell wrote: On 2017-04-26 22:17, Duncan Murdoch wrote: On 26/04/2017 2:51 PM, Therneau, Terry M., Ph.D. wrote: A user contacted me directly about this, I answered with my best understanding of the recent R-help discussion of the issue, and their response to my r

Re: [R] survival package can't find Ccoxfit6

2017-04-28 Thread Henric Winell
On 2017-04-26 22:17, Duncan Murdoch wrote: On 26/04/2017 2:51 PM, Therneau, Terry M., Ph.D. wrote: A user contacted me directly about this, I answered with my best understanding of the recent R-help discussion of the issue, and their response to my response shows that I'm not quite right. I

Re: [R] survival package can't find Ccoxfit6

2017-04-27 Thread SeshanV
Since my coding philosophy is "why compute something that is not needed" I don't have timing data comparing coxph.fit to the stripped down version. I will try to come up with a test suite. I do work under Linux (the initial Windows output was because I had both 3.3.1 and 3.4.0 on that machine).

Re: [R] survival package can't find Ccoxfit6

2017-04-27 Thread SeshanV
Thank you Drs. Therneau and Murdoch. "Why not use coxph.fit?" -- My use case scenario is that I needed the Cox model coefficients for resampled data. I was trying to reduce the computational overhead of coxph.fit (since it will repeated a large number of times) by stripping all the parts that I

Re: [R] survival package can't find Ccoxfit6

2017-04-27 Thread Duncan Murdoch
On 27/04/2017 10:53 AM, sesh...@mskcc.org wrote: Thank you Drs. Therneau and Murdoch. "Why not use coxph.fit?" -- My use case scenario is that I needed the Cox model coefficients for resampled data. I was trying to reduce the computational overhead of coxph.fit (since it will repeated a large

Re: [R] survival package can't find Ccoxfit6

2017-04-27 Thread Therneau, Terry M., Ph.D.
On 04/27/2017 09:53 AM, sesh...@mskcc.org wrote: Thank you Drs. Therneau and Murdoch. "Why not use coxph.fit?" -- My use case scenario is that I needed the Cox model coefficients for resampled data. I was trying to reduce the computational overhead of coxph.fit (since it will repeated a larg

Re: [R] survival package can't find Ccoxfit6

2017-04-27 Thread Therneau, Terry M., Ph.D.
Let me summarize rather than repeat the entire thread: An error report from a user (seshan) stumped me, and I asked for help here. Duncan Murdoch picked up on fine details of the error message, i.e., that the error did NOT come from within the survival package. That changes the whole tenor of

Re: [R] survival package can't find Ccoxfit6

2017-04-26 Thread SeshanV
om] Sent: Wednesday, April 26, 2017 4:18 PM To: Therneau, Terry M., Ph.D.; R-help Cc: Seshan, Venkatraman E./Epidemiology-Biostatistics Subject: Re: [R] survival package can't find Ccoxfit6 On 26/04/2017 2:51 PM, Therneau, Terry M., Ph.D. wrote: > A user contacted me directly about this,

Re: [R] survival package can't find Ccoxfit6

2017-04-26 Thread SeshanV
])), oo$coefficients, > control) [1] -0.4838181 Venkat From: Duncan Murdoch [murdoch.dun...@gmail.com] Sent: Wednesday, April 26, 2017 4:17 PM To: Therneau, Terry M., Ph.D.; R-help Cc: Seshan, Venkatraman E./Epidemiology-Biostatistics Subject: Re: [R] su

Re: [R] survival package can't find Ccoxfit6

2017-04-26 Thread Duncan Murdoch
From: Duncan Murdoch [murdoch.dun...@gmail.com] Sent: Wednesday, April 26, 2017 4:17 PM To: Therneau, Terry M., Ph.D.; R-help Cc: Seshan, Venkatraman E./Epidemiology-Biostatistics Subject: Re: [R] survival package can't find Ccoxfit6 On 26/04/2017 2:51 PM, Therneau, Terry M., Ph.D.

Re: [R] survival package can't find Ccoxfit6

2017-04-26 Thread Duncan Murdoch
Thanks, Venkat -Original Message- From: Duncan Murdoch [mailto:murdoch.dun...@gmail.com] Sent: Wednesday, April 26, 2017 4:18 PM To: Therneau, Terry M., Ph.D.; R-help Cc: Seshan, Venkatraman E./Epidemiology-Biostatistics Subject: Re: [R] survival package can't find Ccoxfit6 On 26/04/

Re: [R] survival package can't find Ccoxfit6

2017-04-26 Thread Duncan Murdoch
On 26/04/2017 2:51 PM, Therneau, Terry M., Ph.D. wrote: A user contacted me directly about this, I answered with my best understanding of the recent R-help discussion of the issue, and their response to my response shows that I'm not quite right. I am emphatically not an MS Windows user so am

Re: [R] survival package can't find Ccoxfit6

2017-04-26 Thread Therneau, Terry M., Ph.D.
A user contacted me directly about this, I answered with my best understanding of the recent R-help discussion of the issue, and their response to my response shows that I'm not quite right. I am emphatically not an MS Windows user so am asking for help -- which I will cut/paste to this user a

[R] survival::clogit, how to extract residuals for GOF assessment

2016-04-26 Thread Joe Ceradini
Hi Folks, Hopefully this question has enough R and not too much stats to be appropriate for this list. Based on,* Hosmer et al. 2013. Logistic regression for matched case-control studies. Applied Logistic Regression *(eqtn. 7.8)*, *I am assessing GOF of conditional (or matched) logistic regression

[R] Survival analysis with interval censored data

2016-03-10 Thread Audrey Bologna
Hi! Does anyone know about survival analysis using interval censored data and the intcox package? I fed different ant colonies with different food (called treatment) and I measured every 2 days the death of ants. I would like to see if the treatment can explain a different death of individuals. S

Re: [R] Survival::coxph (clogit), survConcordance vs. summary(fit) concordance

2016-01-21 Thread Joe Ceradini
Thanks Terry! I thought that since I was providing survConcordance with the model object that the same formula would be applied. But I was obviously wrong. I just ran survConcordance with the addition of the strata argument, as you suggested, and got the same answer as summary(fit)with the sam

Re: [R] Survival::coxph (clogit), survConcordance vs. summary(fit) concordance

2016-01-21 Thread Therneau, Terry M., Ph.D.
I read the digest form which puts me behind, plus the last 2 days have been solid meetings with an external advisory group so I missed the initial query. Three responses. 1. The clogit routine sets the data up properly and then calls a stratified Cox model. If you want the survConcordance ro

Re: [R] Survival::coxph (clogit), survConcordance vs. summary(fit) concordance

2016-01-20 Thread Joe Ceradini
r(site), method ="efron", > data = dat) # warning > fit <- clogit(resp ~ x1 + x2 + strata(ID) + cluster(site), method > ="efron", data = dat) # no warning > summary(fit) > > Chris > > -Original Message- > From: Joe Ceradini [mailto:j

Re: [R] Survival::coxph (clogit), survConcordance vs. summary(fit) concordance

2016-01-20 Thread Andrews, Chris
er(site), method ="efron", data = dat) # no warning summary(fit) Chris -Original Message- From: Joe Ceradini [mailto:joecerad...@gmail.com] Sent: Tuesday, January 19, 2016 12:48 PM To: r-help@r-project.org Subject: [R] Survival::coxph (clogit), survConcordance vs. summary(fit)

[R] Survival::coxph (clogit), survConcordance vs. summary(fit) concordance

2016-01-19 Thread Joe Ceradini
Hi, I'm running conditional logistic regression with survival::clogit. I have "1-1 case-control" data, i.e., there is 1 case and 1 control in each strata. Model: fit <- clogit(resp ~ x1 + x2, strata(ID), cluster(site), method ="efron", data = dat) Where resp is 1's and 0's, and x1 and x2 are both

Re: [R] Survival analysis: ERROR: Time and status are different lengths

2015-12-04 Thread Marleen Hamoen
Hi Terry, I already suspected it had something to do with missing values in one of the covariates. I couldn't get the na.action="na.exclude" to work (perhaps this is because I am relatively unexperienced with R), but I managed to solve the problem by using the following command with "complete.case

Re: [R] Survival analysis: ERROR: Time and status are different lengths

2015-12-04 Thread Therneau, Terry M., Ph.D.
I expect that reading the result of print(fit.weib) will answer your question. If there were any missing values in the data set, then the fit.weib$linear.predictors will be shorter than the original data set, and the printout will have a note about "...deleted due to missing". The simplest sol

[R] Survival analysis: ERROR: Time and status are different lengths

2015-12-03 Thread Marleen Hamoen
Hi, I am fitting an AFT model assuming a Weibull distribution and I would like to check the residuals compared to the Kaplan Meier residuals, but when I try to create the Kaplan Meier residuals I get an error: Time and status are different lengths. I am using the following script: # Fitting the

Re: [R] Survival Analysis and Predict time-to-death

2015-08-18 Thread David Winsemius
It depends on several factors. You need answers to all these questions: How many events occurred, ... and was the period of observation long enough to cover a significant fraction of the life expectancy, …. and is there external evidence or theory that will help establish that this process shou

Re: [R] Survival Analysis and Predict time-to-death

2015-08-18 Thread Göran Broström
On 2015-08-18 01:44, David Winsemius wrote: On Aug 17, 2015, at 1:51 PM, David Winsemius wrote: On Aug 17, 2015, at 12:10 PM, survivalUser wrote: Dear All, I would like to build a model, based on survival analysis on some data, that is able to predict the /*expected time until death*/ fo

Re: [R] Survival analysis and predict time-to-death

2015-08-18 Thread Therneau, Terry M., Ph.D.
I read this list a day late as a digest so my answers are rarely the first. (Which is nice as David W answers most of the survival questions for me!) What you are asking is reasonable, and in fact is common practice in the realm of industrial reliability, e.g., Meeker and Escobar, Statistical

Re: [R] Survival Analysis and Predict time-to-death

2015-08-17 Thread survivalUser
Thank you David for your answer. Some follow-up questions: - So, do you think that try to estimate the life expectancy would be risky and probably not justifiable? Is there some sort of 'confidence' that the model could give me for a prediction? - type=response - I found it here: https://stat.e

Re: [R] Survival Analysis and Predict time-to-death

2015-08-17 Thread David Winsemius
Ooops. I meant to drop that other message but hit the send icon instead. On Aug 17, 2015, at 3:39 PM, Bert Gunter wrote: > David: > > I may have misunderstood you here, specifically: > > "As such I would ask if you really wanted to use a parametric survival > model in the first place? " > >

Re: [R] Survival Analysis and Predict time-to-death

2015-08-17 Thread David Winsemius
On Aug 17, 2015, at 1:51 PM, David Winsemius wrote: > > On Aug 17, 2015, at 12:10 PM, survivalUser wrote: > >> Dear All, >> >> I would like to build a model, based on survival analysis on some data, that >> is able to predict the /*expected time until death*/ for a new data >> instance. > > A

Re: [R] Survival Analysis and Predict time-to-death

2015-08-17 Thread David Winsemius
On Aug 17, 2015, at 3:39 PM, Bert Gunter wrote: > David: > > I may have misunderstood you here, specifically: > > "As such I would ask if you really wanted to use a parametric survival > model in the first place? " > > The K-M curve is , of course, a **non-parametric** fit, and that is > why t

Re: [R] Survival Analysis and Predict time-to-death

2015-08-17 Thread Bert Gunter
David: I may have misunderstood you here, specifically: "As such I would ask if you really wanted to use a parametric survival model in the first place? " The K-M curve is , of course, a **non-parametric** fit, and that is why there can be no mean survival time unless the last point is a death.

Re: [R] Survival Analysis and Predict time-to-death

2015-08-17 Thread David Winsemius
On Aug 17, 2015, at 12:10 PM, survivalUser wrote: > Dear All, > > I would like to build a model, based on survival analysis on some data, that > is able to predict the /*expected time until death*/ for a new data > instance. Are you sure you want to use life expectancy as the outcome? In order

[R] Survival Analysis and Predict time-to-death

2015-08-17 Thread survivalUser
Dear All, I would like to build a model, based on survival analysis on some data, that is able to predict the /*expected time until death*/ for a new data instance. Data For each individual in the population I have the, for each unit of time, the status information and several continuous covariat

Re: [R] Survival Analysis with an Historical Control

2014-07-22 Thread Paul Miller
better. Your code is very interesting. Especially the parametric part. Nice to get an actual p-value for the test. Thanks, Paul On Mon, 7/21/14, Andrews, Chris wrote: Subject: RE: [R] Survival Analysis with an Historical Control Cc: "

Re: [R] Survival Analysis with an Historical Control

2014-07-21 Thread Andrews, Chris
Chris -Original Message- From: Paul Miller [mailto:pjmiller...@yahoo.com] Sent: Thursday, July 10, 2014 8:59 AM To: Andrews, Chris Cc: r-help@r-project.org Subject: RE: [R] Survival Analysis with an Historical Control Hi Chris, Thanks for pointing out the use of "View page source".

Re: [R] Survival Analysis with an Historical Control

2014-07-10 Thread Paul Miller
Thanks, Paul On Wed, 7/9/14, Andrews, Chris wrote: Subject: RE: [R] Survival Analysis with an Historical Control r-project.org> Received: Wednesday, July 9, 2014, 11:26 AM The code is actually available at the websites you provide.  Try &quo

Re: [R] Survival Analysis with an Historical Control

2014-07-10 Thread Paul Miller
Hi Dr. Therneau, Thanks for your response. This is very helpful. My historical control value is 16 weeks. I've been having some trouble though determining how this value was obtained. Are you able to indicate how people normally go about determining a value for the historical control? Or do you

Re: [R] Survival Analysis with an Historical Control

2014-07-10 Thread Therneau, Terry M., Ph.D.
You are asking for a one sample test. Using your own data: connection <- textConnection(" GD2 1 8 12 GD2 3 -12 10 GD2 6 -52 7 GD2 7 28 10 GD2 8 44 6 GD2 10 14 8 GD2 12 3 8 GD2 14 -52 9 GD2 15 35 11 GD2 18 6 13 GD2 20 12 7 GD2 23 -7 13 GD2 24 -52 9 GD2 26 -52 12

Re: [R] Survival Analysis with an Historical Control

2014-07-09 Thread Andrews, Chris
er...@yahoo.com] Sent: Tuesday, July 08, 2014 12:00 PM To: r-help@r-project.org Subject: [R] Survival Analysis with an Historical Control Hello All, I'm trying to figure out how to perform a survival analysis with an historical control. I've spent some time looking online and in my boook

[R] Survival Analysis with an Historical Control

2014-07-08 Thread Paul Miller
Hello All, I'm trying to figure out how to perform a survival analysis with an historical control. I've spent some time looking online and in my boooks but haven't found much showing how to do this. Was wondering if there is a R package that can do it, or if there are resources somewhere that s

[R] survival estimates for covariate values

2014-05-15 Thread array chip
Hi all, let's say we can fit a Cox model with a numeric variable "x" as the independent variable. The we can calculate, say 10-year survival, for any given value of "x" (0 to 10 in increment of 0.1 in the example below): > fit <- coxph(Surv(time, event)~x,dat) > surv10yr<- summary(survfit(fit,n

[R] survival estimates for covariate values

2014-05-14 Thread array chip
Hi all, let's say we can fit a Cox model with a numeric variable "x" as the independent variable. The we can calculate, say 10-year survival, for any given value of "x" (0 to 10 in increment of 0.1 in the example below): > fit <- coxph(Surv(time, event)~x,dat) > surv10yr<- summary(survfit(fit,ne

[R] Survival Model using randomForestSRC

2014-03-01 Thread shilpi harpavat
Hi, I am trying to predict the time to certain type of failure given the following data on Certain Factory Equipments. The data I have are readings collected every day for sensor installed on those equipments .On Same day, an equipment can have different Repaires performed,and on some days no

Re: [R] Survival analysis

2014-01-28 Thread David Winsemius
On Jan 28, 2014, at 4:19 PM, Dennis Murphy wrote: > Hi David: > >>> Do you meant [sic] the (cumulative) hazard function that is 1 minus the >>> survival function? > > Um, 1 - S(t) = F(t), the cumulative *distribution function* of the > random variable T. The cumulative hazard function is -ln S

Re: [R] Survival analysis

2014-01-28 Thread David Winsemius
On Jan 28, 2014, at 7:58 AM, Endy BlackEndy wrote: > Dear R users, how I can implement Breslow and Tarone-Ware tests for > survival analysis? Tests ... of what? Perhaps you should learn to search: install.packages('sos') library(sos) findFn("Tarone-Ware") The 'comp' function in {survMisc} pac

[R] Survival analysis

2014-01-28 Thread Endy BlackEndy
Dear R users, how I can implement Breslow and Tarone-Ware tests for survival analysis? Also, is there any way I can estimate and plot the hazard function,along the lines of the survival function in Survival Package? (The package muhaz seems that does not do what it promises, except if I could not u

Re: [R] Survival analysis with truncated data

2013-11-14 Thread Nicolas Palix
Hi, Thanks for your response. On Thu, Nov 14, 2013 at 4:44 PM, Terry Therneau wrote: > I think that your data is censored, not truncated. > For a fault introduced 1/2005 and erased 2/2006, duration = 13 months > For a fault introduced 4/2010 and still in existence at the last > observation 1

Re: [R] Survival analysis with truncated data

2013-11-14 Thread Terry Therneau
I think that your data is censored, not truncated. For a fault introduced 1/2005 and erased 2/2006, duration = 13 months For a fault introduced 4/2010 and still in existence at the last observation 12/2010, duration> 8 months. For a fault introduced before 2004, erased 3/2005, in a machine

[R] Survival analysis with truncated data.

2013-11-13 Thread Nicolas Palix
Hi, I would like to know how to handle truncated data. My intend is to have the survival curve of a software fault in order to have some information about fault lifespan. I have some observations of a software system between 2004 and 2010. The system was first released in 1994. The event consider

Re: [R] Survival aareg problem

2013-06-05 Thread Terry Therneau
On 06/05/2013 12:33 AM, r-help-requ...@r-project.org wrote: Dear friends - I'm on windows 7, R 2.15.2 when I run the example for aareg in survival package I see this: plot(lfit[4], ylim=c(-4,4)) error in xy.coords(x, y, xlabel, ylabel, log) : 'x' is a list, but does not have components

Re: [R] survival aareg plot problem

2013-06-04 Thread David Winsemius
On Jun 4, 2013, at 1:36 PM, Troels Ring wrote: Dear friends - I'm on windows 7, R 2.15.2 when I run the example for aareg in survival package I see this: plot(lfit[4], ylim=c(-4,4)) error in xy.coords(x, y, xlabel, ylabel, log) : 'x' is a list, but does not have components 'x' and 'y' Is th

[R] survival aareg plot problem

2013-06-04 Thread Troels Ring
Dear friends - I'm on windows 7, R 2.15.2 when I run the example for aareg in survival package I see this: plot(lfit[4], ylim=c(-4,4)) error in xy.coords(x, y, xlabel, ylabel, log) : 'x' is a list, but does not have components 'x' and 'y' Is that a matter of an old R? Best wishes Troels Ri

Re: [R] survival in R

2013-05-24 Thread Bert Gunter
It is not OK. Post to a statistical list, like stats.stackexchange.com , instead. -- Bert On Fri, May 24, 2013 at 1:55 PM, Troels Ring wrote: > Dear friends - I hope it is OK to ask a question on the principles of > survival analysis. I'm a medical person in this project, but wonders about > t

[R] survival in R

2013-05-24 Thread Troels Ring
Dear friends - I hope it is OK to ask a question on the principles of survival analysis. I'm a medical person in this project, but wonders about the statistical methods proposed. We have a huge dataset and assumption of proportional hazard is said to be fulfilled if survival time is fractionate

Re: [R] Survival prediction

2012-10-08 Thread Mitja Kurki
Thanks for your thoughts. 1. The function is 'somewhat' linear. Small curvature but beginning and end are similar. Off course I could fit more complex functions of time. 2. Do I really have to build (start, stop) datasets as I have time-varying covariate effect but not time-varying covariate?

Re: [R] Survival prediction

2012-10-08 Thread Terry Therneau
Dear All, I have built a survival cox-model, which includes a covariate * time interaction. (non-proportionality detected) I am now wondering how could I most easily get survival predictions from my model. My model was specified: coxph(formula = Surv(event_time_mod, event_indicator_mod) ~ Se

[R] survival predictions

2012-10-05 Thread Mitja Kurki
Dear All, I have built a survival cox-model, which includes a covariate * time interaction. (non-proportionality detected) I am now wondering how could I most easily get survival predictions from my model. My model was specified: coxph(formula = Surv(event_time_mod, event_indicator_mod) ~ Sex +

[R] Survival with different probabilities of censoring

2012-05-30 Thread anthonywaldron
Dear all I have a fairly funky problem that I think demands some sort of survival analysis. There are two Red List assessments for mammals: 1986 and 2008. Some mammals changed their Red List status between those dates. Those changes can be regarded as "events" and are "interval censored" in the sen

Re: [R] survival survfit with newdata

2012-05-17 Thread David Winsemius
e to get the survival curves for testX? Thanks in advance. DK CC: r-help@r-project.org From: dwinsem...@comcast.net To: dkrsta...@hotmail.com Subject: Re: [R] survival survfit with newdata Date: Thu, 17 May 2012 00:52:55 -0400 On May 16, 2012, at 5:08 PM, Damjan Krstajic wrote: Dea

Re: [R] survival survfit with newdata

2012-05-16 Thread Damjan Krstajic
oject.org > From: dwinsem...@comcast.net > To: dkrsta...@hotmail.com > Subject: Re: [R] survival survfit with newdata > Date: Thu, 17 May 2012 00:52:55 -0400 > > > On May 16, 2012, at 5:08 PM, Damjan Krstajic wrote: > > > > > Dear all, > > > > I am confused wit

Re: [R] survival survfit with newdata

2012-05-16 Thread David Winsemius
On May 16, 2012, at 5:08 PM, Damjan Krstajic wrote: Dear all, I am confused with the behaviour of survfit with newdata option. Yes. It has the same behavior as any other newdata/predict from regression. You need to supply a dataframe with the same names as in the original formula. Doesn

[R] survival survfit with newdata

2012-05-16 Thread Damjan Krstajic
Dear all, I am confused with the behaviour of survfit with newdata option. I am using the latest version R-2-15-0. In the simple example below I am building a coxph model on 90 patients and trying to predict 10 patients. Unfortunately the survival curve at the end is for 90 patients. Could som

Re: [R] survival analysis simulation question

2012-05-10 Thread Joshua Wiley
I forgot to mention, the Design package is deprecated (which suggest your version of R is rather dated, current is 2.15). The rms package replaces Design. On Thu, May 10, 2012 at 10:23 PM, Joshua Wiley wrote: > Hi Grace, > > I seem to have sent an empty draft before.  Anyway, something like > th

Re: [R] survival analysis simulation question

2012-05-10 Thread Joshua Wiley
Hi Grace, I seem to have sent an empty draft before. Anyway, something like this might be an approach (untested): require(rms) set.seed(10) dat <- data.frame( age = rnorm(500, 40, 10), race = factor(sample.int(2,500,TRUE), labels = c("a", "b"))) X <- model.matrix(~ age + race, data = dat) b

Re: [R] survival analysis simulation question

2012-05-10 Thread Joshua Wiley
On Thu, May 10, 2012 at 7:41 PM, Grace Ma wrote: > Hi, > I am trying to simulate a regression on survival data under a few > conditions: > 1. Under different error distributions > 2. Have the error term be dependent on the covariates > > But I'm not sure how to specify either conditions. I am usin

[R] survival analysis simulation question

2012-05-10 Thread Grace Ma
Hi, I am trying to simulate a regression on survival data under a few conditions: 1. Under different error distributions 2. Have the error term be dependent on the covariates But I'm not sure how to specify either conditions. I am using the Design package to perform the survival analysis using the

[R] Survival data with time dependent covariate

2012-05-09 Thread BrittD
http://r.789695.n4.nabble.com/file/n4619765/survival_file.png Hi everyone, This is what my data looks like, I haven't included the covariates, the example would get too large. uid id date feverstart dumfever 130 75 3464652011-04-11

[R] Survival, should I use (start,stop) and how?

2012-04-20 Thread Asa Johannesen
Dear R users, I fear this is terribly trivial but I'm struggling to get my head around it. First of all, I'm using the "survival" package in R 2.12.2 on Windows Vista with the RExcel plugin. You probably only need to know that I'm using "survival" for this. I have data collected from 180 or so

[R] Survival analysis with events at t=0

2012-04-18 Thread Beutel, Terry S
Dear All Does any one know if the following survival analysis exists, and if so, is it available in R? I am trying to parametrically model survival where some events happen at time = 0. I am particularly interested in generating the 95% confidence interval around the survival function over its

Re: [R] Test-Predict R survival analysis

2012-04-18 Thread Terry Therneau
On 04/18/2012 05:00 AM, r-help-requ...@r-project.org wrote: Hi, I'm trying to use the R Survival analysis on a windows 7 system. The input data format is described at the end of this mail. 1/ I tried to perform a survival analysis including stratified variables using the following fo

  1   2   3   >