Thanks all (particularly to you, Berend) -- I'll push forward with these
solutions and integrate them into my code.  I did come across geigen while
rooting around in the CCA code but its not formally documented (it just
says "for internal use" or something along those lines) and as you found
out above, it does not produce the same solution as the dggev.  It would be
nice to have a more complete set of formal packages for doing LA in R
(rather than having to hand-write .Fortran calls) but I'll leave that to
someone with more expertise in linear algebra than me.  Something that
perhaps matches the SciPy set of functions (both in terms of input and
output):

http://docs.scipy.org/doc/scipy/reference/linalg.html

Some of these are already implemented, but clearly not all of them.

--j

On Sat, Apr 21, 2012 at 1:31 PM, Berend Hasselman <b...@xs4all.nl> wrote:

>
> On 21-04-2012, at 20:20, peter dalgaard wrote:
>
> >
> >>
> >> The eigenvalues are identical upto the printed 9 digits but the
> eigenvectors appear to be quite different.
> >> Maybe this is what Luke meant.
> >>
> >> Berend
> >>
> >
> >
> > They look quite similar to me:
> >
> >> ev <- eigen(solve(B,A) )$vectors
> >> ge <- geigen(A, B, TRUE , TRUE)
> >> ev / ge$vl
> >          [,1]     [,2]       [,3]
> > [1,] 0.9324603 0.813422 -0.7423694
> > [2,] 0.9324603 0.813422 -0.7423694
> > [3,] 0.9324603 0.813422 -0.7423694
> >> ev / ge$vr
> >          [,1]     [,2]       [,3]
> > [1,] 0.9324603 0.813422 -0.7423694
> > [2,] 0.9324603 0.813422 -0.7423694
> > [3,] 0.9324603 0.813422 -0.7423694
> >
> > (and of course, eigenvectors of any sort are only defined up to a
> constant multiplier)
>
> Correct. I should have checked  your way and not optically.
>
> Berend
>
> ______________________________________________
> 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.
>



-- 
Jonathan A. Greenberg, PhD
Assistant Professor
Department of Geography and Geographic Information Science
University of Illinois at Urbana-Champaign
607 South Mathews Avenue, MC 150
Urbana, IL 61801
Phone: 415-763-5476
AIM: jgrn307, MSN: jgrn...@hotmail.com, Gchat: jgrn307, Skype: jgrn3007
http://www.geog.illinois.edu/people/JonathanGreenberg.html

        [[alternative HTML version deleted]]

______________________________________________
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.

Reply via email to