[R] Getting HR from Cox model in R
info at aghmed.fsnet.co.uk
Tue Dec 23 18:21:54 CET 2014
On 23/12/2014 09:42, Ruzan Udumyan wrote:
> Dear All,
> I am not familiar with R language well. Could you please help me interpret
> these commands?:
> TE = exp(sum(coef(cox)[c('aTRUE', 'bTRUE')])) - does it mean exp(coef(a
> variable) + coef(b variable)) ?
You have not given us much to go on here.
I assume if you go
you will find elements labelled aTRUE and bTRUE which implies the
existence of a logical covariate with values TRUE and FALSE. The author
of the code is trying to do what you suggest.
> DE = exp(unname(coef(cox)['aTRUE'])) - what is unname for ?
> Thank you very much beforehand for your help.
> Wishing you happy holidays,
> [[alternative HTML version deleted]]
> > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
If you post again please do read the message above.
> No virus found in this message.
> Checked by AVG - www.avg.com
> Version: 2015.0.5577 / Virus Database: 4257/8792 - Release Date: 12/23/14
More information about the R-help