[R] Hazard ratio calculation and KM plot p-value:
I have two questions: 1) Can anyone provide me with a reference regarding calculation of Hazard ratio for two groups of data. How is it being manually calculated with an example. Unlike median time ratio which is the ratio of median times in two groups, at what time is the hazard ratio calculation done? 2) In kaplan-meier statistics of stratifying into two groups, a p-value is often calculated (e.g. log-rank p-value). p-value is the test is how significant the separation is between two groups compared to random. What is random in kaplan-meier statistics. How is p-value calculated? Thanks for everyone's time to read and hopefully respond as well. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] hazard ratio between my groups
HI, I am interested in calculating hazard ratio of the stratified groups defined by me. library(survcomp) binscores - cut(scores.train,c(-1000,-1,1,1000),c(low,intermediate,high)) dd - data.frame(surv.time=OS, surv.event= status, strat=binscores) km.coxph.plot(formula.s=Surv(surv.time, surv.event) ~ strat) How do I calculate hazard ratio between the groups defined by me as above? Thanks very much, Angel [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Hazard ratio
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 ? . The other question is that how do I interpret the second column in the second panel (i.e., exp(-coef)) 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 .95upper .95 y1 0.9762 1.0244 0.9703 0.9821 x2 1.0368 0.9645 0.8796 1. Thanks in advance __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Hazard ratio
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 .95upper .95 y1 0.9762 1.0244 0.9703 0.9821 x2 1.0368 0.9645 0.8796 1. Thanks in advance David Winsemius, MD Heritage Laboratories West Hartford, CT __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Hazard ratio
David, Thank you very much for your response. I fitted the model as factor instead of numeric. coxfit1 - coxph(Surv(sdat$time, sdat$cens)~factor(y1)+factor(x2) coef exp(coef) se(coef) z Pr(|z|) factor(y1)2 0.036161 1.036822 0.083921 0.431 0.6665 factor(y1)3 -0.510124 0.600421 0.088901 -5.738 9.57e-09 *** factor(x2)2 -0.510124 0.600421 0.088901 -5.738 9.57e-09 *** What are those values? Is it comparing in reference to the first class of each covariate? Thanks again. On Thu, Dec 10, 2009 at 8:33 AM, Ashta sewa...@gmail.com 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 ? . The other question is that how do I interpret the second column in the second panel (i.e., exp(-coef)) 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. Thanks in advance __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Hazard ratio
Yes, in this case it's comparing to the value '1'. In general with factors it's comparing to whatever level is missing. Sam On Thu, Dec 10, 2009 at 10:40 AM, Ashta sewa...@gmail.com wrote: David, Thank you very much for your response. I fitted the model as factor instead of numeric. coxfit1 - coxph(Surv(sdat$time, sdat$cens)~factor(y1)+factor(x2) coef exp(coef) se(coef) z Pr(|z|) factor(y1)2 0.036161 1.036822 0.083921 0.431 0.6665 factor(y1)3 -0.510124 0.600421 0.088901 -5.738 9.57e-09 *** factor(x2)2 -0.510124 0.600421 0.088901 -5.738 9.57e-09 *** What are those values? Is it comparing in reference to the first class of each covariate? Thanks again. On Thu, Dec 10, 2009 at 8:33 AM, Ashta sewa...@gmail.com 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 ? . The other question is that how do I interpret the second column in the second panel (i.e., exp(-coef)) 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. Thanks in advance __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] hazard ratio of interaction Cox model
Dear Forum, I have a question about interaction estimate in the Cox model: why the hazard ratio of the interaction is not produced in the summary of the model? (Instead, the estimate of the coefficient is given in the print of the model.) # Example: modINT -cph( Surv(T_BASE, T_FIN,STATUS)~ NYHA + ASINI + RFP + FE_REC + XX_PR*XX_DISF) print(modINT) coef se(coef) zp NYHA=2 1.2540.584 2.15 0.031767 ASINI 0.6650.409 1.62 0.104247 RFP=20.7250.704 1.03 0.302578 FE_REC=2-1.6370.810 -2.02 0.043331 XX_PR2.1890.649 3.37 0.000748 XX_DISF 3.2331.000 3.23 0.001222 XX_PR * XX_DISF -2.8521.280 -2.23 0.025852 summary(modINT) Effects Response : Surv(T_BASE, T_FIN, STATUS) Factor LowHigh Diff. Effect S.E. Lower 0.95 Upper 0.95 ASINI 2.0725 2.85 0.7775 0.52 0.32 -0.111.14 Hazard Ratio 2.0725 2.85 0.7775 1.68NA 0.903.13 XX_PR 0. 1.00 1. 2.19 0.65 0.923.46 Hazard Ratio 0. 1.00 1. 8.92NA 2.50 31.86 XX_DISF0. 1.00 1. 3.23 1.00 1.275.19 Hazard Ratio 0. 1.00 1. 25.35NA 3.57 179.88 NYHA - 2:1 1. 2.00 NA 1.25 0.58 0.112.40 Hazard Ratio 1. 2.00 NA 3.50NA 1.12 11.00 RFP - 2:1 1. 2.00 NA 0.73 0.70 -0.652.10 Hazard Ratio 1. 2.00 NA 2.07NA 0.528.20 FE_REC - 2:1 1. 2.00 NA -1.64 0.81 -3.23 -0.05 Hazard Ratio 1. 2.00 NA 0.19NA 0.040.95 Adjusted to: XX_PR=0 XX_DISF=0 Be a better friend, newshound, and [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.