[R] Find A, given B where B=A'A

Simon Wood s.wood at bath.ac.uk
Thu Nov 1 09:58:00 CET 2007


On Wednesday 31 October 2007 22:45, Peter Dalgaard wrote:
> 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.
mgcv::mroot will do this for you, using pivoted Choleski decomposition or svd. 
You can specify the rank of B (which must be positive semi-definite of 
course), which will then determine the dimension of A, alternatively the 
routine will attempt to determine the rank of B (and usually over-estimate it 
slightly). 

-- 
> Simon Wood, Mathematical Sciences, University of Bath, Bath, BA2 7AY UK
> +44 1225 386603  www.maths.bath.ac.uk/~sw283



More information about the R-help mailing list