[R] coxph won't converge when including categorical (factor) variables

Jeff Newmiller jdnewmil at dcn.davis.CA.us
Sat Jul 6 18:26:35 CEST 2013


I don't know much about your problem, but if you want help you are going to need to learn to communicate effectively. This may help:

http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
---------------------------------------------------------------------------
Jeff Newmiller                        The     .....       .....  Go Live...
DCN:<jdnewmil at dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
--------------------------------------------------------------------------- 
Sent from my phone. Please excuse my brevity.

E Joffe <ejoffe at hotmail.com> wrote:

>Hello,
>
> 
>
>[rephrasing and reposting  of a previous question (that was not
>answered)
>with new information]
>
> 
>
>I have a dataset of 371 observations.
>
>When I run coxph with numeric variables it works fine.
>
>However, when I try to add factor (categorical) variables it returns
>"Ran
>out of iterations and the model did not converge"
>
> 
>
>Of note, when I restructure all factors to binary variables with dummy
>and
>use glmnet-lasso the model converges.
>
> 
>
>Here are examples of the code and output (including summary description
>of
>the variables):
>
>> maxSTree.cox <- coxph (Surv(time,status)~Chemo_Simple, data=dataset)
>
> 
>
>Warning message:
>
>In fitter(X, Y, strats, offset, init, control, weights = weights,  :
>
>  Ran out of iterations and did not converge
>
> 
>
>> summary (dataset$Chemo_Simple)
>
>                        Anthra_HDAC       Anthra_Plus       ArsenicAtra
>ATRA           ATRA_GO 
>
>                0               163                 2                12
>0                 2 
>
>         ATRA_IDA Demeth_HistoneDAC          Flu_HDAC     Flu_HDAC_plus
>HDAC_Clof         HDAC_only 
>
>                0                34                37                 4
>24                 1 
>
>        HDAC_Plus        LowArac       LowDAC_Clof         MYLO_IL11
>Phase1 
>
>                4                 8                30                 5
>5 
>
>              SCT    StdARAC_Anthra      StdAraC_Plus          Targeted
>VNP40101M 
>
>                0                 0                 0                13
>23 
>
> 
>
> 
>
>HELP !!!!
>
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org 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.



More information about the R-help mailing list