{smcl} {* 20jul2001}{...} {hline} help for {hi:geneigen}{right:(StataList distribution 20 July 2001)} {hline} {title:Eigenvalues of a real general matrix} {p 8 14}{cmd:geneigen} {it:matrixname} {title:Description} {p}{cmd:geneigen} calculates the eigenvalues of a square matrix. The eigenvalues of a square symmetric matrix may be calculated by {help mat symeigen}, but official Stata cannot calculate the eigenvalues of a nonsymmetric matrix. {cmd:geneigen} executes EISPACK code to calculate the eigenvalues' real part, imaginary part, and modulus via the QR algorithm for real Hessenberg matrices, as described in Press et al. (1992, Chapter 11). {p}The routine returns a {cmd:N} by 4 matrix {cmd:r(eigen)}, containing, respectively, the modulus, real part, imaginary part, and cumulated modulus. The eigenvalues are sorted in order of ascending moduli. {p} If Stata considers a matrix to be symmetric, its own {help mat symeigen} routine should be used rather than this routine. {title:Examples} {p 8 12}{inp:. mat kk=(1,2,3\-6,-8,-14\122,345,678)} {p 8 12}{inp:. geneigen kk} {p 8 12}{inp:. return list} {title:Acknowledgements} The routine makes use of Jeroen Weesie's {cmd:qsortidx} routine, part of his very useful {stata findit qsort:qsort} package. Thanks to Paul McGale for noting an error in the translation of the routine. {title:References} Press, William H., Teukolsky, Saul A., Vetterling, William T. and Brian P. Flannery. Numerical Recipes in C, Second Edition. Cambridge: Cambridge University Press, 1992. {title:Author} Christopher F Baum, Boston College, USA, baum@bc.edu {title:Also see} {p 0 19}On-line: help for {help mat symeigen}