This is a simple R program that I have been trying to run. I keep running into
the "singular matrix" error. I end up with no sensible results. Can anyone
suggest any changes or a way around this?
I am a total rookie when working with R.
Thanks,
Rasika
> library(survival)
Loading required package: splines
> args(coxph)
function (formula, data, weights, subset, na.action, init, control,
method = c("efron", "breslow", "exact"), singular.ok = TRUE,
robust = FALSE, model = FALSE, x = FALSE, y = TRUE, tt, ...)
NULL
> test1<-read.table("S:/FISHDO/03_Phase_I_Field_Work/Data_6_28_2011/Working
> Folder/R_files/4SondesJuly24.csv", header=T, sep=",")
> sondes<-coxph(Surv(Start, Stop, Depart)~DOLoomis + DOI55 + DODamen,
> data=test1)
Warning messages:
1: In fitter(X, Y, strats, offset, init, control, weights = weights, :
Loglik converged before variable 1,2 ; beta may be infinite.
2: In coxph(Surv(Start, Stop, Depart) ~ DOLoomis + DOI55 + DODamen, :
X matrix deemed to be singular; variable 3
> summary(sondes)
Call:
coxph(formula = Surv(Start, Stop, Depart) ~ DOLoomis + DOI55 +
DODamen, data = test1)
n= 1737, number of events= 58
(1 observation deleted due to missingness)
coef exp(coef) se(coef) z Pr(>|z|)
DOLoomis -2.152e+00 1.163e-01 1.161e+05 0 1
DOI55 4.560e-01 1.578e+00 3.755e+04 0 1
DODamen NA NA 0.000e+00 NA NA
exp(coef) exp(-coef) lower .95 upper .95
DOLoomis 0.1163 8.5995 0 Inf
DOI55 1.5777 0.6338 0 Inf
DODamen NA NA NA NA
Concordance= 0.5 (se = 0 )
Rsquare= 0 (max possible= 0.01 )
Likelihood ratio test= 0 on 2 df, p=1
Wald test = 0 on 2 df, p=1
Score (logrank) test = 0 on 2 df, p=1
>
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.