Hi, Can anybody tell me what the message below means and how to overcome it. Thanks, Neil Warning message: X matrix deemed to be singular; variable 2 in: coxph(Surv(age_at_death, death) ~ project$pluralgp + project$yrborn + ......... >
"Hi, Can anybody tell me what the message below means and how to overcome it. Thanks, Neil Warning message: X matrix deemed to be singular; variable 2 in: coxph(Surv(age_at_death, death) ~ project$pluralgp + project$yrborn + ........." Your 2nd covariate (yrborn) is colinear to the other covariates (or nearly colinear). R drops it, but warns you. The results are OK. Mayeul KAUFFMANN Universit?? Pierre Mend??s France Grenoble France
This is the output. I think it means that there is a problem with project$pluralgpTriplet??? Neil > fm.CPH Call: coxph(formula = Surv(age_at_death, death) ~ project$pluralgp + project$yrborn + project$private + project$pcdead + project$mheight + project$ga2 + project$apgcode + project$apgar5 + project$VLBWgp + project$PEBW + project$LBWgp + project$LBWcat + project$totadm + project$totlos + project$sex + teen + project$DS + project$pcsborn + project$disadv + project$ecores + project$edoccu) coef exp(coef) se(coef) z p project$pluralgpTwin -0.509203 0.601 0.74415 -0.6843 4.9e-01 project$pluralgpTriplet NA NA 0.00000 NA NA project$yrborn1988-1992 -0.083348 0.920 0.22553 -0.3696 7.1e-01 project$private 0.260465 1.298 0.12384 2.1032 3.5e-02 project$pcdead -0.058200 0.943 0.49418 -0.1178 9.1e-01 project$mheight 0.016361 1.016 0.01745 0.9378 3.5e-01 project$ga2 0.104246 1.110 0.10162 1.0258 3.0e-01 project$apgcode4-7 -0.266885 0.766 0.50211 -0.5315 6.0e-01 project$apgcode1-3 -1.704620 0.182 1.12545 -1.5146 1.3e-01 project$apgar5 -0.427139 0.652 0.14099 -3.0296 2.4e-03 project$VLBWgp=>1500 grams 0.046203 1.047 0.65494 0.0705 9.4e-01 project$PEBW 0.015297 1.015 0.01356 1.1281 2.6e-01 project$LBWgp=>2500 grams -0.257472 0.773 0.42496 -0.6059 5.4e-01 project$LBWcat -0.222823 0.800 0.23938 -0.9308 3.5e-01 project$totadm 0.005836 1.006 0.01536 0.3800 7.0e-01 project$totlos 0.007342 1.007 0.00176 4.1664 3.1e-05 project$sexFemale -0.016431 0.984 0.22803 -0.0721 9.4e-01 teen 0.286282 1.331 0.34807 0.8225 4.1e-01 project$DSDown syndrome 1.193727 3.299 0.27227 4.3844 1.2e-05 project$pcsborn -0.704743 0.494 0.75943 -0.9280 3.5e-01 project$disadv -0.000573 0.999 0.00250 -0.2296 8.2e-01 project$ecores -0.001588 0.998 0.00249 -0.6392 5.2e-01 project$edoccu 0.000590 1.001 0.00193 0.3054 7.6e-01 Likelihood ratio test=102 on 22 df, p=2.87e-12 n=2126 (1396 observations deleted due to missing) > On 16/10/2004, at 6:32 PM, Mayeul KAUFFMANN wrote:> "Hi, > Can anybody tell me what the message below means and how to overcome > it. > Thanks, > Neil > Warning message: > X matrix deemed to be singular; variable 2 in: coxph(Surv(age_at_death, > death) ~ project$pluralgp + project$yrborn + ........." > > Your 2nd covariate (yrborn) is colinear to the other covariates (or > nearly > colinear). R drops it, but warns you. The results are OK. > > Mayeul KAUFFMANN > Universit?? Pierre Mend??s France > Grenoble > France > >
sorry for late answer. "This is the output. I think it means that there is a problem with project$pluralgpTriplet??? Neil" Yes. definitely. there are probably no triplet, or all triplet are coded as twins too (and there are no real twins). Or the only triplet is the first individual that dies (in fact, the latter should rather give an infinite exp(coef), I think). You also seem to use many qualitative variable. If a combination of two of the other variables is identical to "pluralgpTriplet", R drops the variable. (This is true for any regression model.) To find out which combination, you may regress pluralgpTriplet on all other variables with lm(). You'll probably have R??=1 and some very low p-values. If the number of triplet is very small, I advise you group them with twins, except if it is a major variable in your model. Cheers, Mayeul KAUFFMANN Universit?? Pierre Mend??s France Grenoble - France > fm.CPH Call: coxph(formula = Surv(age_at_death, death) ~ project$pluralgp + project$yrborn + project$private + project$pcdead + project$mheight + project$ga2 + project$apgcode + project$apgar5 + project$VLBWgp + project$PEBW + project$LBWgp + project$LBWcat + project$totadm + project$totlos + project$sex + teen + project$DS + project$pcsborn + project$disadv + project$ecores + project$edoccu) coef exp(coef) se(coef) z p project$pluralgpTwin -0.509203 0.601 0.74415 -0.6843 4.9e-01 project$pluralgpTriplet NA NA 0.00000 NA NA project$yrborn1988-1992 -0.083348 0.920 0.22553 -0.3696 7.1e-01 project$private 0.260465 1.298 0.12384 2.1032 3.5e-02 project$pcdead -0.058200 0.943 0.49418 -0.1178 9.1e-01 project$mheight 0.016361 1.016 0.01745 0.9378 3.5e-01 project$ga2 0.104246 1.110 0.10162 1.0258 3.0e-01 project$apgcode4-7 -0.266885 0.766 0.50211 -0.5315 6.0e-01 project$apgcode1-3 -1.704620 0.182 1.12545 -1.5146 1.3e-01 project$apgar5 -0.427139 0.652 0.14099 -3.0296 2.4e-03 project$VLBWgp=>1500 grams 0.046203 1.047 0.65494 0.0705 9.4e-01 project$PEBW 0.015297 1.015 0.01356 1.1281 2.6e-01 project$LBWgp=>2500 grams -0.257472 0.773 0.42496 -0.6059 5.4e-01 project$LBWcat -0.222823 0.800 0.23938 -0.9308 3.5e-01 project$totadm 0.005836 1.006 0.01536 0.3800 7.0e-01 project$totlos 0.007342 1.007 0.00176 4.1664 3.1e-05 project$sexFemale -0.016431 0.984 0.22803 -0.0721 9.4e-01 teen 0.286282 1.331 0.34807 0.8225 4.1e-01 project$DSDown syndrome 1.193727 3.299 0.27227 4.3844 1.2e-05 project$pcsborn -0.704743 0.494 0.75943 -0.9280 3.5e-01 project$disadv -0.000573 0.999 0.00250 -0.2296 8.2e-01 project$ecores -0.001588 0.998 0.00249 -0.6392 5.2e-01 project$edoccu 0.000590 1.001 0.00193 0.3054 7.6e-01