Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: eigenvector after manovatest


From   [email protected]
To   [email protected]
Subject   Re: st: eigenvector after manovatest
Date   Tue, 20 May 2003 09:20:18 -0500

Ricardo Ovaldia <[email protected]> asks

> The -manovatest- command after manova saves the
> eigenvalues of the (H^-1)(E) matrix in r(eigvals). How
> can get the eigenvectors?

[I assume you mean (E^-1)(H).]

And in another message asks

> One more question about -manova- (if you don't mind):
> is there a way to get the 1st canonical variate for a
> given null hypothesis. For example Ho:
> foreign=domestic?
> 
> This is computed as V_1'Y_j, where v_1 is the
> eigenvector corresponding to the largest eigenvalue,
> and Y_j is the vector of dependent variables for the j
> subject. Can predict do this?

Since the MANOVA test statistics are functions of the eigenvalues
and do not directly make use of the eigenvectors, -manova- and
-manovatest- do not save off the eigenvectors.

Actually, -manova- and -manovatest- internally compute the
eigenvalues of KHK' where K is inv(cholesky(E)).  This has the
same eigenvalues as inv(E)*H.  So internally, Stata does not
compute the eigenvectors of inv(E)*H at all, and hence does not
have them sitting around to return to the user.

After -manova- and -manovatest- you can grab the eigenvalues and
the H and E matrices of interest.  You can take the H and E
matrices and try to compute the eigenvectors.  Realize that
inv(E)*H is not symmetric.  The -matrix symeigen- command give
eigenvalues and vectors, but only for symmetric matrices, while
-matrix eigenvalues- gives only eigenvalues, but allows
nonsymmetric matrices.

Just today I read on statalist where Mark Schaffer
<[email protected]> responded to Kaleb Michauds inquiry
concerning obtaining eigenvectors from a square non-symmetric
matrix.

> > PS. I still would LOVE to see a program in Stata for determining
> > eigenvectors from a square non-symmetric matrix. You've got one for
> > eigenvalues, just one more not-quite-simple step. :)
> 
> finidit eigenvalues => Kit Baum's GENEIGEN.  Does exactly what you
> want, I think.

I have no experience with -geneigen-, but you might want to explore that
possibility for obtaining the eigenvectors of inv(E)*H


Ken Higbee    [email protected]
StataCorp     1-800-STATAPC

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index