[R] Lapack routine dgesv: system is exactly singular
Terry Therneau
therneau at mayo.edu
Tue Jan 10 15:28:58 CET 2012
I was sent a copy of the data on request. A quick look shows that
> range(days.alive[censored==0])
[1] 0 1825
> range(days.alive[censored==1])
[1] 1826 1826
The original call of survdiff(Surv(days.alive, censored) ~ group) will
assume that censored=1 corresponds to deaths and 0 to alive; from the
above this is almost certainly backwards. If instead we force 0 to be
the "yes they're dead" group the results look better.
> survdiff(Surv(days.alive, censored==0) ~ group, f2)
Call:
survdiff(formula = Surv(days.alive, censored == 0) ~ group, data = f2)
N Observed Expected (O-E)^2/E (O-E)^2/V
group=PRI_CAS_5_NODU 3326 1129 1745 217.7 281
group=SEC_CAS_5_NODUP 13469 6731 6115 62.1 281
Chisq= 281 on 1 degrees of freedom, p= 0
In the original setup the test statistic had value 0 + roundoff error
and std = 0 + roundoff error due to all the "deaths" being tied on
exactly the same day, and you were getting the matrix version of a 0/0
error.
Terry T
------- begin included message ----
I have a problem with this error, I have searched the archives and found
previous discussion about this, can I cannot understand how the
explanations
apply to what I am trying to do.
I am trying to do Log_rank Survival analysis, I have included tables and
str command, is it a factor/integer problem? If so how do I correct
this, as all my attempt to recode the data have failed.
> survdiff(Surv(f2$days.alive , f2$censored)~group, data=f2)
Error in drop(.Call("La_dgesv", a, as.matrix(b), tol, PACKAGE =
"base")) :
Lapack routine dgesv: system is exactly singular
More information about the R-help
mailing list