[R] coxph won't converge when including categorical (factor) variables
Bert Gunter
gunter.berton at gene.com
Sat Jul 6 15:42:15 CEST 2013
Hint: Why do you think no one replied?
1. That it converged with one model/fitting algorithm and not with
another is useless.
2. This cannot possibly be answered without your data.
3. A guess: you are overfitting -- glmnet regularizes and will
therefore fit (highly) correlated regressors coxph won't. .
-- Bert
On Sat, Jul 6, 2013 at 5:04 AM, 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.
--
Bert Gunter
Genentech Nonclinical Biostatistics
Internal Contact Info:
Phone: 467-7374
Website:
http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm
More information about the R-help
mailing list