stepAIC(coxph) forward selection
On Nov 4, 2009, at 9:26 PM, Rupa Parvataneni wrote:
Dear R-Help, I am trying to perform forward selection on the following coxph model:
my.bpfs <- Surv(bcox$pfsdays, bcox$pfscensor) b.cox <- coxph(my.bpfs ~ Cbase + Abase + Cbave + CbSD + KPS + gender +
as.factor(eor) + Age)
I am a bit puzzled by the choice of a maximal model when you are then specifying only "forward". Wouldn't that choice imply that you should be starting with; b.cox <- coxph(my.bpfs ~ 1)
stepAIC(b.cox, scope=list(upper =~ Cbase + Abase +
Cbave + CbSD + KPS + gender + as.factor(eor) + Age, lower=~1),
direction=
c("forward"))
However the following code returns the full model. How do I write
the code
so that forward selection is performed?
Nothing in this reply should be taken to mean that this is a valid approach to model selection. Stepwise methods often are an abdication of an analyst's responsibility to use prior scientific knowledge.
David Winsemius, MD Heritage Laboratories West Hartford, CT