[R] Doing a Cox-Regression in R and SPSS

Bernd Weiss bernd.weiss at epost.de
Sun Mar 11 08:30:00 CET 2001


A.S.: I am sorry for sending my first mail to <r-help at R-
project.org>. 
---------------------------------------------------------

Hallo, 

computing a Cox proportional hazards model in SPSS 9.0 and 
R 1.2.2 produces different results for beta-coefficient. 

I use the follwing data set (source: example in  
help(coxph), somewhat modified) 

Time	Status	Covariate (x) 
------------------------- 
4,00	1,00	,00 
3,00	1,00	1,00 
1,00	1,00	1,00 
1,00	,00		1,00 
2,00	1,00	1,00 
2,00	1,00	,00 
3,00	,00		,00 


The results in SPSS: 
-------------------- 
beta		= 1,44 
exp(beta)	= 4,20 
SE			= 1,17 

SPSS Syntax: 
-------------------- 
COXREG 
  t  /STATUS=s(1) 
  /METHOD=ENTER x 
  /CRITERIA=PIN(.05) POUT(.10) ITERATE(20) . 


The results in R: 
-------------------- 
beta		= 1.46 
exp(beta)	= 4,32 
SE			= 1,17 

R Syntax: 
-------------------- 
test1 <- list(time=  c(4, 3,1,1,2,2,3), 
                status=c(1,1,1,0,1,1,0), 
                x=     c(0, 1,1,1,1,0,0), 
summary(coxph( Surv(time, status) ~ x, test1)) 


BTW: The results of SPSS and TDA (Transition Data Analysis) 
 correspondent exactly. 

What went wrong? I strongly suppose, I did some mistakes,  
but I can't image what kind of mistakes. Any ideas? 

Thanks in advance 

Bernd 



--
Bernd Weiß (bernd.weiss at epost.de)
PGP Key ID: 0x4117206F
PGP FP: 08B2 09CD 7192 526D 93FD  2070 53DB 7C4F 4117 206F
www.pgpi.org
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list