[R-sig-teaching] discrepancies between R and stata

mboutsen mboutsen at ulb.ac.be
Sun May 17 15:38:29 CEST 2009


Hi


I am trying R and more particulary the cox model
With the same data base, I get a hazard ratio (5.82) that is not the 
same obtained with stata

Attached the file leukemia.dta

Here are the codes

for R
library(foreign)
leukemia<-read.dta("leukemia.dta")
library(survival)
res <- coxph(Surv(TIME, STATUS)~TREAT, data=leukemia)
summary(res)


for stata
use "leukemia.dta",clear
stset TIME, failure(STATUS==1)
stcox TREAT

SPSS and EPIinfo give the same HR than Stata

I tried with an other database without any problem

What is the problem???

I saw a few posts with discrepancies but with no explanations

Thanks in advance

Michel Boutsen
Brussel's University
Department of Biostatistics



More information about the R-sig-teaching mailing list