From kolassa at stat.rutgers.edu  Thu Mar  4 18:14:52 2004
From: kolassa at stat.rutgers.edu (kolassa@stat.rutgers.edu)
Date: Fri Mar  5 14:24:50 2004
Subject: [Rd] Application of step to coxph using method="exact" (PR#6646)
Message-ID: <20040304171452.F317CFB8F@slim.kubism.ku.dk>

Full_Name: John E. Kolassa
Version: Version 1.8.1
OS: Solaris
Submission from: (NULL) (128.6.76.36)


Stepwise model selection for coxph appears to fail with method="exact".
The code

step(coxph(Surv(1:100,rep(1,100))~factor(rep(1:4,25)),method="exact"))

produces the error message 

Start:  AIC= 733.07 
 Surv(1:100, rep(1, 100)) ~ factor(rep(1:4, 25)) 

Error in "[<-"(`*tmp*`, i + 1, , value = extractAIC(nfit, scale, k = k,  : 
        number of items to replace is not a multiple of replacement length

The same code without specifying method 
step(coxph(Surv(1:100,rep(1,100))~factor(rep(1:4,25))))

runs through, and gives what looks like a reasonable answer.  Thanks, John
Kolassa


[Rd] Application of step to coxph using method="exact" (PR#6646)
kolassa@stat.rutgers.edu