Michael Gormley wrote: > Thanks for your help, all those who submitted responses. I do not need a > specific matrix A, any solution will do. With this said, is it possible to > specify the dimensions of the A matrix in the decompostion? For example, if > A is a 2X1 matrix then A'A=B would be a 2X2 as well. >
B would have rank 1 then, and a pivoted Choleski decomposition has zero rows e.g. > B <- outer(c(2,3),c(2,3)) > B [,1] [,2] [1,] 4 6 [2,] 6 9 > chol(B, pivot=TRUE) [,1] [,2] [1,] 3 2 [2,] 0 0 attr(,"pivot") [1] 2 1 attr(,"rank") [1] 1 Warning message: In chol.default(B, pivot = TRUE) : matrix not positive definite an eigen() decomposition could also be used. -- O__ ---- Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ R-help@r-project.org 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.