> On Tue, Jun 9, 2009 at 4:46 PM, Nathan Danneman wrote:
> > I would like to find the roots of complex univariate
> > expressions, such as y=x^3+2x^2-5.
--- On Tue, 9/6/09, Tirthankar Chakravarty wrote:
> /* begin */
> clear*
> mata
> polyroots((-5, 0, 2, 1))
> end
> /* end */
If your expression is not a polynomial you can look
at Ben Jann's -moremata- package, and in particular
his -mm_root()- and -mm_nrroot()- commands.
Hope this helps,
Maarten
-----------------------------------------
Maarten L. Buis
Institut fuer Soziologie
Universitaet Tuebingen
Wilhelmstrasse 36
72074 Tuebingen
Germany
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/