[R] Hazard ratio
David Winsemius
dwinsemius at comcast.net
Thu Dec 10 14:47:20 CET 2009
On Dec 10, 2009, at 8:33 AM, Ashta wrote:
> Hi all,
>
> I want to calculate hazard ratio within each covariate
>
> Example, one covariate has 3 classes (1,2 and 3) and x2 has 2 classes
>
> I want to compare the relative risk ratio within each class of the
> covariate.
> How do I get this result ? .
Code as factors instead of numeric.
>
> The other question is that how do I interpret the second column in
> the second panel (i.e., exp(-coef))
It is the effect of a decrease by one unit of that variable.
>
> I used the model
> coxfit1 <- coxph(Surv(sdat$time, sdat$cens)~ y1+x2)
>
> coef exp(coef) se(coef) z Pr(>|z|)
> y1 -0.024084 0.976204 0.003077 -7.828 5.00e-15 ***
> x2 0.036161 1.036822 0.083921 0.431 0.6665
>
> exp(coef) exp(-coef) lower .95 upper .95
> y1 0.9762 1.0244 0.9703 0.9821
> x2 1.0368 0.9645 0.8796 1.2222
>
>
> Thanks in advance
>
David Winsemius, MD
Heritage Laboratories
West Hartford, CT
More information about the R-help
mailing list