[R] Error in solvet: apparently singular matrix
Gad Abraham
gabraham at csse.unimelb.edu.au
Sat Oct 18 06:00:01 CEST 2008
Hi,
Again I'm doing logistic regression using lrm from Harrell's Design
package, but on wide matrices (28 observations, 1891 variables) so L2
penalisation is used. I get the following error, although I've tried
different penalties and different tolerances. The X matrix is scaled and
centred.
> library(Design)
> load(url("http://www.csse.unimelb.edu.au/~gabraham/data2.Rdata"))
> l <- lrm(y ~ X, penalty=100, tol=1e-13)
Error in solvet(info.matrix, tol = tol) : apparently singular matrix
> traceback()
4: stop("apparently singular matrix")
3: solvet(info.matrix, tol = tol)
2: fitter(X, Y, initial = f$coef, maxit = 1, tol = tol)
1: lrm(y ~ X, penalty = 100, tol = 1e-13)
Any idea what the reason for this error is?
Thanks,
Gad
> sessionInfo()
R version 2.7.2 (2008-08-25)
i386-apple-darwin8.11.1
locale:
en_AU.UTF-8/en_AU.UTF-8/C/C/en_AU.UTF-8/en_AU.UTF-8
attached base packages:
[1] splines stats graphics grDevices utils datasets methods
base
other attached packages:
[1] Design_2.1-1 survival_2.34-1 Hmisc_3.4-3
loaded via a namespace (and not attached):
[1] cluster_1.11.11 grid_2.7.2 lattice_0.17-15
--
Gad Abraham
Dept. CSSE and NICTA
The University of Melbourne
Parkville 3010, Victoria, Australia
email: gabraham at csse.unimelb.edu.au
web: http://www.csse.unimelb.edu.au/~gabraham
More information about the R-help
mailing list