Re: [R] cox model

2018-11-03 Thread David Winsemius
It's also "well described" in the help materials for the obvious recommended package that ships with every copy of R. My copy sits at http://127.0.0.1:29434/library/survival/doc/timedep.pdf. Therneau's S package was first ported to R by Thomas Lumley and later Therneau took over maintenance.

Re: [R] cox model

2018-11-03 Thread Jeff Newmiller
Stop re-posting this question. It only irritates people... it does not improve your chances of getting help. What does improve your chances is reading the Posting Guide and following the advice given there. Your question amounts to asking someone to figure out what theory you should apply to

Re: [R] cox model

2018-11-03 Thread David Winsemius
It's also "well described" in the help materials for the obvious recommended package that ships with every copy of R. My copy sits at http://127.0.0.1:29434/library/survival/doc/timedep.pdf. Therneau's S package was first ported to R by Thomas Lumley and later Therneau took over maintenance.

[R] cox model

2018-11-03 Thread Medic
I need a R-code for a situation that is well described in the sas help. I would be very grateful for the help! "Time-dependent variables can be used to model the effects of subjects transferring from one treatment group to another. One example of the need for such strategies is the Stanford heart

[R] cox model

2018-11-02 Thread post .
I need a R-code for a situation that is well described in the sas help. I would be very grateful for the help! "Time-dependent variables can be used to model the effects of subjects transferring from one treatment group to another. One example of the need for such strategies is the Stanford heart

[R] cox model

2018-11-02 Thread post .
I need a R-code for a situation that is well described in the sas help. I would be very grateful for the help! "Time-dependent variables can be used to model the effects of subjects transferring from one treatment group to another. One example of the need for such strategies is the Stanford heart

[R] Cox model with time-dependent coefficients

2017-08-11 Thread Theresa Grimm
Dear R-help Community, I'm currently struggling with some issues extending the proportional Cox model with time-dependent coefficients and could really need some help. Since I'm not experienced in adding code in an email in a nice way I add the link to my question and code:

Re: [R] Cox model with multiple events - PH assumption

2014-12-23 Thread Therneau, Terry M., Ph.D.
On 12/23/2014 05:00 AM, r-help-requ...@r-project.org wrote: Dear all, I'm using the package survival for adjusting the Cox model with multiple events (Prentice, Williams and Peterson Model). I have several covariates, some of them are time-dependent. I'm using the functioncox.zph to check

[R] Cox model with multiple events - Proportional Hazards Assumption

2014-12-22 Thread Maria Helena Mourino Silva Nunes
Dear all, I'm using the package survival for adjusting the Cox model with multiple events (Prentice, Williams and Peterson Model). I have several covariates, some of them are time-dependent. I'm using the functioncox.zph to check the proportional hazards. Due to the nature of the time-dependent

[R] Cox model -missing data.

2014-12-19 Thread aoife doherty
Hi all, I have a data set like this: Test.cox file: V1V2 V3 Survival Event ann 13 WTHomo 41 ben 20 *51 tom 40 Variant 61 where *

Re: [R] Cox model -missing data.

2014-12-19 Thread Shouro Dasgupta
First recode the * in NA: death.dat$v3[death.dat$v1==*] - NA Include this in your model: na.rm=TRUE Or you could create a new dataset: newdata - na.omit(death.dat) Shouro On Fri, Dec 19, 2014 at 11:12 AM, aoife doherty aoife.m.dohe...@gmail.com wrote: Hi all, I have a data set like

Re: [R] Cox model -missing data.

2014-12-19 Thread Ted Harding
Hi Aoife, I think that if you simply replace each * in the data file with NA, then it should work (NA is usually interpreted as missing for those functions for which missingness is relevant). How you subsequently deal with records which have missing values is another question (or many questions

Re: [R] Cox model -missing data.

2014-12-19 Thread aoife doherty
Many thanks, I appreciate the response. When I convert the missing values to NA and run the cox model as described in previous post, the cox model seems to remove all of the rows with a missing value (as the number of rows n in the cox output after I completely remove any row with missing data

Re: [R] Cox model -missing data.

2014-12-19 Thread Ted Harding
Yes, your basic reasoning is correct. In general, the observed variables carry information about the variables with missing values, so (in some way) the missing values can be replaced with estimates (imputations) and the standard regression method will then work as though the replacements were

Re: [R] Cox model -missing data.

2014-12-19 Thread Michael Dewey
Comment inline On 19/12/2014 11:17, aoife doherty wrote: Many thanks, I appreciate the response. When I convert the missing values to NA and run the cox model as described in previous post, the cox model seems to remove all of the rows with a missing value (as the number of rows n in the cox

[R] Cox model: random effect on a variable with 3 levels

2013-04-30 Thread lmajed
Question about package Coxme: I develop a cox model that includes a variable treatment with 3 levels (A, B, C): model_alea_int - coxme(Surv(delai, status) ~ (1|trt)+ strata(center) , data) I am surprised that the output given in R is 3 coefficients for random effects whereas only 2 dummy

Re: [R] Cox model convergence

2013-02-18 Thread Terry Therneau
On 02/16/2013 05:00 AM, r-help-requ...@r-project.org wrote: Then I perform cox regression as follows m2_1-coxph(Surv(X_t0,X_t, vlsupp) ~ nvp + as.factor(cd4pccat) + as.factor(vlcat) + as.factor(agecat) + as.factor(whostage) + as.factor(hfacat) + as.factor(wfacat) + as.factor(wfhcat) +

Re: [R] Cox model approximaions (was comparing SAS and R survival....)

2012-04-02 Thread AO_Statistics
I have a question about Cox's partial likelihood approximations in coxph function of survival package (and in SAS as well) in the presence of tied events generated by grouping continuous event times into intervals. I am processing estimations for recurrent events with time-dependent covariates in

Re: [R] Cox model approximaions (was comparing SAS and R survival....)

2011-07-24 Thread Göran Broström
On Fri, Jul 22, 2011 at 2:04 PM, Terry Therneau thern...@mayo.edu wrote:  For time scale that are truly discrete Cox proposed the exact partial likelihood. Or the method of partial likelihood applied to the discrete logistic model,  I call that the exact method and SAS calls it the discrete

Re: [R] Cox model approximaions (was comparing SAS and R survival....)

2011-07-22 Thread Terry Therneau
For time scale that are truly discrete Cox proposed the exact partial likelihood. I call that the exact method and SAS calls it the discrete method. What we compute is precisely the same, however they use a clever algorithm which is faster. To make things even more confusing, Prentice

Re: [R] Cox model approximaions (was comparing SAS and R survival....)

2011-07-22 Thread Mike Marchywka
From: thern...@mayo.edu To: abouesl...@gmail.com Date: Fri, 22 Jul 2011 07:04:15 -0500 CC: r-help@r-project.org Subject: Re: [R] Cox model approximaions (was comparing SAS and R survival) For time scale that are truly discrete Cox

Re: [R] Cox model, model averaging and survival curve

2011-03-16 Thread Martin Patenaude-Monette
Thanks a lot for your answer. Martin Patenaude-Monette MSc. Candidate Département de biologie Université du Québec à Montréal 2011/3/15 Terry Therneau thern...@mayo.edu --- included text -- I have done model selection between candidate Cox models, using AICc calculated with penalized log

Re: [R] Cox model, model averaging and survival curve

2011-03-15 Thread Terry Therneau
--- included text -- I have done model selection between candidate Cox models, using AICc calculated with penalized log likelihoods. Then model averaging was done to obtain model averaged parameter estimates. Is there a way to plot survival curve from the averaged model, by estimating baseline

[R] Cox model, model averaging and survival curve

2011-03-14 Thread Martin Patenaude-Monette
Dear community, I have done model selection between candidate Cox models, using AICc calculated with penalized log likelihoods. Then model averaging was done to obtain model averaged parameter estimates. Is there a way to plot survival curve from the averaged model, by estimating baseline hazard

[R] Cox model output hazard ratios

2010-11-17 Thread Julien Vezilier
Dear R users, Here is the coxme output I obtain on my survival dataset having 3 strains and 2 infection status (i: infected, ni: non infected) coxme(Surv(lay) ~ infection*strain, data=datalay, random= ~1 |block) Cox mixed-effects model fit by maximum likelihood Data: datalay n= 1194

Re: [R] Cox model+ROCR

2008-03-04 Thread Terry Therneau
I am trying to build a cox model and then perform ROC analysis in order to retrieve some genes that are correlated with breast cancer. When I calculate ... Extension of ROC values to the censored data case is handled by the rcorr.cens function found in the Hmisc library. See the references

[R] Cox model+ROCR

2008-03-03 Thread Eleni Christodoulou
Dear list, I am trying to build a cox model and then perform ROC analysis in order to retrieve some genes that are correlated with breast cancer. When I calculate the hazard score taking into account different numbers of genes and their coefficients ( I am trying to find the pest predictor number

Re: [R] Cox model

2008-02-13 Thread Terry Therneau
What you appear to want are all of the univariate models. You can get this with a loop (and patience - it won't be fast). ngene - ncol(genes) coefmat - matrix(0., nrow=ngene, ncol=2) for (i in 1:ngene) { tempfit - coxph(Surv(time, relapse) ~ genes[,i]) coefmat[i,] -

Re: [R] Cox model

2008-02-13 Thread Eleni Christodoulou
Hmm...I see. I think I will give a try to the univariate analysis nonetheless...I intend to catch the p-values for each gene and select the most significant from these...I have seen it in several papers. Best Regards, Eleni On Feb 13, 2008 2:59 PM, Terry Therneau [EMAIL PROTECTED] wrote: What

Re: [R] Cox model

2008-02-13 Thread Matthias Gondan
Hi Eleni, The problem of this approach is easily explained: Under the Null hypothesis, the P values of a significance test are random variables, uniformly distributed in the interval [0, 1]. It is easily seen that the lowest of these P values is not any 'better' than the highest of the P

Re: [R] Cox model

2008-02-13 Thread Gustaf Rydevik
On Feb 13, 2008 2:37 PM, Matthias Gondan [EMAIL PROTECTED] wrote: Hi Eleni, The problem of this approach is easily explained: Under the Null hypothesis, the P values of a significance test are random variables, uniformly distributed in the interval [0, 1]. It is easily seen that the lowest

Re: [R] Cox model

2008-02-13 Thread Gustaf Rydevik
On Feb 13, 2008 3:06 PM, Gustaf Rydevik [EMAIL PROTECTED] wrote: On Feb 13, 2008 2:37 PM, Matthias Gondan [EMAIL PROTECTED] wrote: Hi Eleni, The problem of this approach is easily explained: Under the Null hypothesis, the P values of a significance test are random variables, uniformly

Re: [R] Cox model

2008-02-13 Thread Duncan Murdoch
On 2/13/2008 9:08 AM, Gustaf Rydevik wrote: On Feb 13, 2008 3:06 PM, Gustaf Rydevik [EMAIL PROTECTED] wrote: On Feb 13, 2008 2:37 PM, Matthias Gondan [EMAIL PROTECTED] wrote: Hi Eleni, The problem of this approach is easily explained: Under the Null hypothesis, the P values of a

Re: [R] Cox model

2008-02-12 Thread darteta001
Dear Eleni, from a previous post regarding maximum number of variables in a multiple linear regression analysis, posted last tuesday, and I think it can be relevant also to Cox PH models: I can think of no circumstance where multiple regression on hundreds of thousands of variables is anything

Re: [R] Cox model

2008-02-12 Thread Eleni Christodoulou
Hi David, The problem is that I need all these regressors. I need a coefficient for every one of them and then rank them according to that coefficient. Thanks, Eleni On Feb 12, 2008 4:54 PM, [EMAIL PROTECTED] wrote: Hi Eleni, I am not an expert in R or statistics but in my opinion you have

Re: [R] Cox model

2008-02-12 Thread darteta001
Hi Eleni, I am not an expert in R or statistics but in my opinion you have too many regressors compared to the number of observations and that might be the reason why you get the error. Others might say better but as far as I know, having only 80 observations, it is a good idea to first

[R] Cox model

2008-02-12 Thread Eleni Christodoulou
Hello R-community, It's been a week now that I am struggling with the implementation of a cox model in R. I have 80 cancer patients, so 80 time measurements and 80 relapse or no measurements (respective to censor, 1 if relapsed over the examined period, 0 if not). My microarray data contain