Quantcast

stepAIC(coxph) forward selection

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

stepAIC(coxph) forward selection

Rupa Parvataneni
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)>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?

Thanks,
Rupa

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: stepAIC(coxph) forward selection

David Winsemius

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

______________________________________________
[hidden email] 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.
Loading...