Hi, I'm trying to use the R Survival analysis on a windows 7 system. The input data format is described at the end of this mail. 1/ I tried to perform a survival analysis including stratified variables using the following formula. cox.xtab_miR=coxph(Surv(time, status) ~ miR + strata(sex,nbligne, age), data=matrix) and obtain the following error message Warning message: In fitter(X, Y, strats, offset, init, control, weights = weights, : Ran out of iterations and did not converge Is this due to the model (error in formula) or is the number of stratified variables fixed? 2/ I wanted to used the predict information to create a survival model based on the same parameter as previously described - (Surv(time, status) ~ miR + strata(sex,nbligne, age) - and than testing it on the predict set of data.. I there any way to do that? Is there any way to plot this? Many thanks for your help. Kind regards / Sandrine Input data > matrix $time [1] 58.14 17.10 14.71 17.43 16.00 7.00 7.50 8.00 8.00 9.85 20.00 9.14 [13] 3.85 5.00 4.00 13.00 15.71 32.00 33.00 8.00 36.00 8.00 42.00 31.43 [25] 29.71 80.00 25.14 40.00 25.14 30.00 12.00 10.71 28.00 4.57 9.00 15.71 [37] 6.85 39.85 6.57 42.00 16.28 14.00 6.71 12.57 65.14 35.28 33.85 52.00 [49] 24.57 32.71 7.28 70.00 7.28 6.71 23.00 10.00 7.14 19.86 55.42 40.28 [61] 21.28 31.14 34.00 44.00 7.28 70.71 7.57 44.85 56.00 21.14 91.71 $status [1] 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 1 0 1 0 [26] 0 0 1 0 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 0 1 1 1 1 0 [51] 1 1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 $miR [1] 836.12000 458.64000 442.03000 125.47000 2914.44000 [6] 114.53000 8091.10000 2645.75000 3269.46000 1168.67000 [11] 3541.42000 508.79000 177.34000 4705.90000 6677.30000 [16] 4223.73000 787.69265 415.92000 100.57000 10.58000 [21] 42.78000 29.36000 13.47000 1.00000 13.08000 [26] 67.89000 16.09000 49.01000 75.78000 26.36000 [31] 6.36000 31.64173 218.00000 15699.17000 3215.71000 [36] 294.98000 106678.83000 554.79000 198.53000 161.64000 [41] 2481.18283 1093.70000 5496.18000 144.28000 12.50000 [46] 79.49000 45.64000 31.07000 8.12000 15.27000 [51] 15.65780 18.00000 2172.67000 345.35000 3256.34000 [56] 3332.58000 296.32000 7889.62000 936.50000 458.60000 [61] 1212.32000 2762.48000 1047.78000 3193.43000 319.27000 [66] 16.29000 69.31000 84.11000 35.43000 4.98000 [71] 41.75000 $nbligne [1] 1 2 3 3 2 4 2 3 2 3 3 2 3 4 3 2 2 2 2 3 3 3 2 2 NA [26] 2 2 2 3 4 5 2 1 2 2 3 2 2 3 3 3 2 2 1 6 3 2 1 2 2 [51] 1 2 2 2 2 2 2 2 2 2 1 2 2 2 1 2 2 2 2 2 2 $sex [1] 1 2 1 1 1 2 1 2 1 1 1 2 1 1 1 2 2 1 1 1 1 2 2 1 1 [26] 1 1 1 1 1 1 2 1 2 2 1 1 2 2 1 2 1 1 1 1 1 2 1 2 2 [51] 1 1 1 2 1 1 1 1 1 1 2 1 2 1 2 1 1 1 2 2 2 $age [1] 77.00 64.00 50.00 57.00 60.00 53.00 51.00 57.69 53.50 77.37 65.39 78.10 [13] 51.38 73.22 57.33 53.39 44.68 55.94 58.00 47.00 62.00 48.00 55.00 55.00 [25] 56.00 22.00 77.00 56.09 65.63 48.00 61.00 73.99 68.71 47.34 71.60 61.16 [37] 77.94 73.21 66.45 67.69 48.84 70.96 74.43 65.41 64.73 77.87 58.70 65.00 [49] 73.34 75.64 87.86 57.23 60.43 68.27 64.57 51.12 61.91 60.12 84.54 53.99 [61] 33.88 75.95 43.29 67.38 67.80 66.30 52.36 58.81 69.35 80.47 54.38 $predict [1] TRAINING TRAINING TRAINING TRAINING TRAINING TRAINING TRAINING TRAINING [9] TRAINING TRAINING TRAINING PREDICT PREDICT PREDICT PREDICT PREDICT [17] PREDICT PREDICT TRAINING TRAINING TRAINING TRAINING TRAINING TRAINING [25] TRAINING TRAINING TRAINING TRAINING TRAINING PREDICT PREDICT PREDICT [33] PREDICT PREDICT PREDICT PREDICT PREDICT PREDICT PREDICT PREDICT [41] PREDICT PREDICT PREDICT PREDICT PREDICT PREDICT PREDICT PREDICT [49] PREDICT PREDICT PREDICT PREDICT PREDICT PREDICT PREDICT PREDICT [57] PREDICT PREDICT PREDICT PREDICT PREDICT PREDICT PREDICT PREDICT [65] PREDICT PREDICT PREDICT PREDICT PREDICT PREDICT PREDICT Levels: PREDICT TRAINING -- Sandrine Imbeaud INSERM, UMR U-674, IUH Université Paris Descartes Génomique Fonctionnelle des tumeurs solides 27 rue Juliette Dodu F75010 Paris, France TEL: +33 (0)1 53 72 51 98 FAX: +33 (0)1 53 72 51 92 MOBILE: +33 (0)6 12 69 80 29 http://www.inserm-u674.net/ [[alternative HTML version deleted]]
On 04/18/2012 05:00 AM, r-help-request at r-project.org wrote:> Hi, > > I'm trying to use the R Survival analysis on a windows 7 system. > The input data format is described at the end of this mail. > > 1/ I tried to perform a survival analysis including stratified variables > using the following formula. > cox.xtab_miR=coxph(Surv(time, status) ~ miR + strata(sex,nbligne, age), > data=matrix) > and obtain the following error message > Warning message: > In fitter(X, Y, strats, offset, init, control, weights = weights, : > Ran out of iterations and did not converge > > Is this due to the model (error in formula) or is the number of > stratified variables fixed?The Cox model compares the deaths to the non-deaths, separately within each stratum, then adds up the result. Your data set and model combination puts each subject into their own strata, so there is no one to compare them to. The fit has no data to use and so must fail. (I admit the error message is misleading, but I hadn't ever seen someone make this particular mistake before.) The following model works much better > coxph(Surv(time, status) ~ miR + age + nbligne + strata(sex)) coef exp(coef) se(coef) z p miR 2.75e-05 1.00 9.35e-06 2.941 0.0033 age 3.39e-03 1.00 1.01e-02 0.334 0.7400 nbligne 7.14e-02 1.07 1.32e-01 0.542 0.5900 Likelihood ratio test=5.87 on 3 df, p=0.118 n= 70, number of events= 59 (1 observation deleted due to missingness) Terry Therneau
Seemingly Similar Threads
- matrix to a C function
- Slow RAID Check/high %iowait during check after updgrade from CentOS 6.5 -> CentOS 7.2
- Slow RAID Check/high %iowait during check after updgrade from CentOS 6.5 -> CentOS 7.2
- How to define proper breaks in RFM analysis
- How to define proper breaks in RFM analysis