Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
Stas Kolenikov <skolenik@gmail.com> |

To |
statalist@hsphsun2.harvard.edu |

Subject |
Re: st: Iterative solving of an equation |

Date |
Tue, 20 Apr 2010 09:40:15 -0500 |

In Stata, there's a very old -ridder- command -- it relies on Stata 3 or some other stone age version of Stata. In Mata, you can find -mm_root()- and -mm_nrroot()- functions in Ben Jann's -moremata- package. On Tue, Apr 20, 2010 at 4:17 AM, David Scheuer <david.scheuer@gmx.de> wrote: > I am rebuilding cost of capital models, which determine cost of capital implied as the internal rate of return from a valuation model. > > For instance, let me assume this is the first line in my dataset and I want to solve the following equation. > > Price_0 = 100 > BookValue_0 = 50 > EPS_1 = 3 > BookValue_1 = 52 > EPS_2 = 4.5 > g = 0.04 > x =? > > 100=50+(3-x*50)/(1+x)+(4-x*52)/((1+x)^2)+((4.5-x*54)*1.04)/((x-0.04)*(1+x)^2) > > For example, in Excel, I would let the "Solver" find the solution for x. > How can I program STATA to find solutions like this for me? > -- > GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! > Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01 > * > * 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/ > -- Stas Kolenikov, also found at http://stas.kolenikov.name Small print: I use this email account for mailing lists only. * * 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/

**References**:**st: Iterative solving of an equation***From:*"David Scheuer" <david.scheuer@gmx.de>

- Prev by Date:
**st: new package netplot in ssc** - Next by Date:
**RE: Re: st: remaining missings after multiple imputation** - Previous by thread:
**Re: st: RE: Iterative solving of an equation** - Next by thread:
**st: graph question** - Index(es):