[R] crr - computationally singular

Laura Bonnett l.j.bonnett at googlemail.com
Thu Jun 25 17:38:43 CEST 2009


Dear R-help,

I'm very sorry to ask 2 questions in a week.  I am using the package
'crr' and it does exactly what I need it to when I use the dataset a.
However, when I use dataset b I get the following error message:
Error in drop(.Call("La_dgesv", a, as.matrix(b), tol, PACKAGE = "base")) :
  system is computationally singular: reciprocal condition number = 1.28654e-24

This is obviously as a result of a problem with the data but apart
from dataset a having 1674 rows and dataset b having 701 rows there is
really no difference between them.

The code I am using is as follows where covaea and covaeb are matrices
of covarites, all coded as binary variables.
In case a:
> covaea <- cbind(sexa,fsha,fdra,nsigna,eega,th1a,th2a,stype1a,stype2a,stype3a,pgu1a,pgu2a,log(agea),firstinta/1000,totsezbasea)
> fita <- crr(snearma$with.Withtime,csaea,covaea,failcode=2,cencode=0)

and in case b:
> covaeb <- cbind(sexb,fshb,fdrb,nsignb,eegb,th1b,th2b,stype1b,stype2b,stype3b,stype4b,stype5b,pgu1b,pgu2b,(ageb/10)^(-1),firstintb,log(totsezbaseb))
> fitb <- crr(snearmb$with.Withtime,csaeb,covaeb,failcode=2,cencode=0)

csaea and csaeb are the censoring indicators for a and b respectively
which equal 1 for the event of interest, 2 for the competing risks
event and 0 otherwise.

Can anyone suggest a reason for the error message?  I've tried running
fitb with variants of covaeb and irrespective of the order of the
covariates in the matrix, the code runs fine with 16 of the 17
covariates included but then produces an error message when the 17th
is added.

Thank you for your help,

Laura




More information about the R-help mailing list