kende jan
2009-Oct-27 07:29 UTC
[R] Error in solve.default peforming Competing risk regression
Dear all, I am trying to use the crr function in the cmprsk package version 2.2 to analyse 198 observations.I have receive the error in solve.default. Can anyone give me some insights into where the problem is? Thanks here is my script : cov=cbind(x1,x2) z<-crr(ftime,fstatus,cov)) and data file: x1 x2 fstatus ftime 0 .02 1 263 0 .03 1 113 0 .03 1 523 0 .03 3 49 0 .03 1 278 0 .03 1 190 0 .04 1 472 0 .04 1 357 0 .04 1 219 0 .0429 3 49 0 .05 1 207 0 .05 1 166 0 .06 3 55 0 .06 2 17 0 .07 1 264 0 .07 2 67 0 .07 3 37 0 .08 2 190 0 .08 3 72 0 .08 2 36 0 .08 1 96 0 .09 2 136 0 .09768 1 273 0 .1 1 167 0 .1 2 76 0 .1 3 107 0 .1 3 71 0 .1 1 116 0 .11 2 62 0 .11 1 256 0 .11 1 385 0 .11 1 266 0 .11 1 174 0 .11 3 334 0 .12 3 270 0 .12 1 49 0 .12 1 733 0 .13 1 271 0 .13 2 160 0 .13 1 105 0 .14 2 56 0 .14 2 49 0 .15 1 266 0 .15 1 46 0 .15 1 112 0 .15 1 246 0 .16 1 371 0 .16 1 140 0 .16 1 279 0 .16 1 174 0 .1617 1 80 0 .17 1 73 0 .17 3 54 0 .17 1 320 0 .17 1 213 0 .18 1 215 0 .18 1 282 0 .18 1 263 0 .18 3 99 0 .2 1 266 0 .2 1 59 0 .20976 1 1659 0 .21 1 111 0 .21 1 62 0 .22 1 386 0 .24 1 249 0 .24 2 79 0 .26 1 199 0 .26 1 95 0 .26 1 270 0 .26 1 189 0 .26706 3 21 0 .27 1 83 0 .27 1 45 0 .29 1 154 0 .29 1 221 0 .29 1 174 0 .2924 1 112 0 .3 1 208 0 .3 2 31 0 .32 1 82 0 .33 2 152 1 .34 1 595 0 .37 1 182 0 .38 1 231 0 .38 1 282 1 .38 1 60 0 .42 1 181 0 .44 1 103 0 .45 3 251 0 .45 2 176 0 .47 1 234 0 .49 3 26 1 .53 1 42 0 .555 1 152 0 .56 1 229 1 .57 1 179 0 .58 1 89 0 .62187 3 61 0 .66 3 32 1 .69 1 14 1 .69 1 71 0 .7594 1 90 1 .9462 3 91 0 .95 1 138 1 .969 1 91 1 1.1 3 129 0 1.17 1 145 1 1.26 1 46 1 1.36 1 187 0 1.36 1 74 1 1.48 1 69 0 1.6 1 102 1 1.6 2 174 1 1.9 2 103 1 1.9 1 152 1 2.1 1 159 1 2.16 1 238 1 2.20 1 140 0 2.23 1 124 1 2.42 1 61 1 2.45 1 283 1 2.47 1 42 1 2.58 2 291 1 2.59 1 182 1 2.73 3 28 1 2.73 1 459 1 3.007 1 179 1 3.04 1 52 1 3.167 3 85 1 3.245 1 559 1 3.25 1 320 1 3.233 1 482 1 3.275 1 82 1 3.3714 1 982 1 3.3652 1 42 1 3.41 1 184 1 3.4833 1 87 1 3.5324 1 31 1 3.5818 1 374 1 3.629 1 49 1 3.6368 1 297 1 3.7 1 93 1 3.78 1 364 1 3.884 1 56 1 3.88 1 66 1 3.891 1 60 1 3.936 1 205 1 4.042 1 61 1 4.38 2 99 1 4.392 1 311 1 4.411 2 57 1 4.48 1 97 1 4.5 3 176 1 4.510 1 94 1 4.572 1 568 1 4.6 1 96 1 4.664 1 59 1 4.825 1 36 1 5.15 1 459 1 5.185 2 111 1 5.333 1 58 1 5.32 1 77 1 5.348 3 38 1 5.473 2 77 1 5.544 1 453 1 5.733 1 363 1 5.866 1 32 1 5.9 1 57 1 5.94 1 1870 1 6 1 28 1 6.09 1 53 1 6.302 1 23 1 6.667 1 196 1 6.647 2 45 1 6.727 1 132 1 6.304 3 39 1 6.746 1 61 1 6.786 1 50 1 7 1 25 1 7.044 1 252 1 7.164 2 42 1 7.690 3 134 1 7.802 1 80 1 8.398 1 133 1 8.666 1 32 1 8.687 3 41 1 8.794 1 29 1 8.887 1 93 1 9.172 3 48 1 9.796 1 275 1 11.36 1 230 1 11.56 1 47 1 12.12 1 75 1 12.14 2 168 1 12.41 1 318 1 16.50 1 67 1 17.21 1 510 [[alternative HTML version deleted]]
Ravi Varadhan
2009-Oct-27 13:26 UTC
[R] Error in solve.default peforming Competing risk regression
Please send reproducible code when you report problems. I am unable to reproduce your problem. It seems to work just fine.> dat <- read.table("e:/temp/crrdata.txt", sep="\t", header=TRUE)> names(dat)[1] "x1" "x2" "fstatus" "ftime"> dim(dat)[1] 198 4> cov=cbind(dat$x1,dat$x2)> z <- crr(dat$ftime, dat$fstatus, cov)> zconvergence: TRUE coefficients: [1] 0.360900 -0.002484 standard errors: [1] 0.23180 0.03413 two-sided p-values: [1] 0.12 0.94>So, what is your problem? Also, make sure that you understand what you are doing with competing risks analysis. It seems like you do not have any censoring, i.e. all the subjects are failing from one of three causes. Read the documentation of ?crr carefully. Ravi. ____________________________________________________________________ Ravi Varadhan, Ph.D. Assistant Professor, Division of Geriatric Medicine and Gerontology School of Medicine Johns Hopkins University Ph. (410) 502-2619 email: rvaradhan at jhmi.edu ----- Original Message ----- From: kende jan <kendejan at yahoo.fr> Date: Tuesday, October 27, 2009 3:31 am Subject: [R] Error in solve.default peforming Competing risk regression To: R forum <r-help at r-project.org>> Dear all, > > I am trying to use the crr function in the cmprsk > package version 2.2 to analyse 198 observations.I have receive the > error in solve.default. > Can anyone give me some > insights into where the problem is? > Thanks > > > here is my script : > > > cov=cbind(x1,x2) > z<-crr(ftime,fstatus,cov)) > > and data file: > > x1 x2 fstatus ftime > 0 .02 1 263 > 0 .03 1 113 > 0 .03 1 523 > 0 .03 3 49 > 0 .03 1 278 > 0 .03 1 190 > 0 .04 1 472 > 0 .04 1 357 > 0 .04 1 219 > 0 .0429 3 49 > 0 .05 1 207 > 0 .05 1 166 > 0 .06 3 55 > 0 .06 2 17 > 0 .07 1 264 > 0 .07 2 67 > 0 .07 3 37 > 0 .08 2 190 > 0 .08 3 72 > 0 .08 2 36 > 0 .08 1 96 > 0 .09 2 136 > 0 .09768 1 273 > 0 .1 1 167 > 0 .1 2 76 > 0 .1 3 107 > 0 .1 3 71 > 0 .1 1 116 > 0 .11 2 62 > 0 .11 1 256 > 0 .11 1 385 > 0 .11 1 266 > 0 .11 1 174 > 0 .11 3 334 > 0 .12 3 270 > 0 .12 1 49 > 0 .12 1 733 > 0 .13 1 271 > 0 .13 2 160 > 0 .13 1 105 > 0 .14 2 56 > 0 .14 2 49 > 0 .15 1 266 > 0 .15 1 46 > 0 .15 1 112 > 0 .15 1 246 > 0 .16 1 371 > 0 .16 1 140 > 0 .16 1 279 > 0 .16 1 174 > 0 .1617 1 80 > 0 .17 1 73 > 0 .17 3 54 > 0 .17 1 320 > 0 .17 1 213 > 0 .18 1 215 > 0 .18 1 282 > 0 .18 1 263 > 0 .18 3 99 > 0 .2 1 266 > 0 .2 1 59 > 0 .20976 1 1659 > 0 .21 1 111 > 0 .21 1 62 > 0 .22 1 386 > 0 .24 1 249 > 0 .24 2 79 > 0 .26 1 199 > 0 .26 1 95 > 0 .26 1 270 > 0 .26 1 189 > 0 .26706 3 21 > 0 .27 1 83 > 0 .27 1 45 > 0 .29 1 154 > 0 .29 1 221 > 0 .29 1 174 > 0 .2924 1 112 > 0 .3 1 208 > 0 .3 2 31 > 0 .32 1 82 > 0 .33 2 152 > 1 .34 1 595 > 0 .37 1 182 > 0 .38 1 231 > 0 .38 1 282 > 1 .38 1 60 > 0 .42 1 181 > 0 .44 1 103 > 0 .45 3 251 > 0 .45 2 176 > 0 .47 1 234 > 0 .49 3 26 > 1 .53 1 42 > 0 .555 1 152 > 0 .56 1 229 > 1 .57 1 179 > 0 .58 1 89 > 0 .62187 3 61 > 0 .66 3 32 > 1 .69 1 14 > 1 .69 1 71 > 0 .7594 1 90 > 1 .9462 3 91 > 0 .95 1 138 > 1 .969 1 91 > 1 1.1 3 129 > 0 1.17 1 145 > 1 1.26 1 46 > 1 1.36 1 187 > 0 1.36 1 74 > 1 1.48 1 69 > 0 1.6 1 102 > 1 1.6 2 174 > 1 1.9 2 103 > 1 1.9 1 152 > 1 2.1 1 159 > 1 2.16 1 238 > 1 2.20 1 140 > 0 2.23 1 124 > 1 2.42 1 61 > 1 2.45 1 283 > 1 2.47 1 42 > 1 2.58 2 291 > 1 2.59 1 182 > 1 2.73 3 28 > 1 2.73 1 459 > 1 3.007 1 179 > 1 3.04 1 52 > 1 3.167 3 85 > 1 3.245 1 559 > 1 3.25 1 320 > 1 3.233 1 482 > 1 3.275 1 82 > 1 3.3714 1 982 > 1 3.3652 1 42 > 1 3.41 1 184 > 1 3.4833 1 87 > 1 3.5324 1 31 > 1 3.5818 1 374 > 1 3.629 1 49 > 1 3.6368 1 297 > 1 3.7 1 93 > 1 3.78 1 364 > 1 3.884 1 56 > 1 3.88 1 66 > 1 3.891 1 60 > 1 3.936 1 205 > 1 4.042 1 61 > 1 4.38 2 99 > 1 4.392 1 311 > 1 4.411 2 57 > 1 4.48 1 97 > 1 4.5 3 176 > 1 4.510 1 94 > 1 4.572 1 568 > 1 4.6 1 96 > 1 4.664 1 59 > 1 4.825 1 36 > 1 5.15 1 459 > 1 5.185 2 111 > 1 5.333 1 58 > 1 5.32 1 77 > 1 5.348 3 38 > 1 5.473 2 77 > 1 5.544 1 453 > 1 5.733 1 363 > 1 5.866 1 32 > 1 5.9 1 57 > 1 5.94 1 1870 > 1 6 1 28 > 1 6.09 1 53 > 1 6.302 1 23 > 1 6.667 1 196 > 1 6.647 2 45 > 1 6.727 1 132 > 1 6.304 3 39 > 1 6.746 1 61 > 1 6.786 1 50 > 1 7 1 25 > 1 7.044 1 252 > 1 7.164 2 42 > 1 7.690 3 134 > 1 7.802 1 80 > 1 8.398 1 133 > 1 8.666 1 32 > 1 8.687 3 41 > 1 8.794 1 29 > 1 8.887 1 93 > 1 9.172 3 48 > 1 9.796 1 275 > 1 11.36 1 230 > 1 11.56 1 47 > 1 12.12 1 75 > 1 12.14 2 168 > 1 12.41 1 318 > 1 16.50 1 67 > 1 17.21 1 510 > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > > PLEASE do read the posting guide > and provide commented, minimal, self-contained, reproducible code.
Possibly Parallel Threads
- Competing Risks Regression with qualitative predictor with more than 2 categories
- crr question‏ in library(cmprsk)
- crr - computationally singular
- Plotting question re. cuminc
- How to parse the arguments from a function call and evaluate them in a dataframe?