Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

st: How to maximize/minimize two equations in Stata


From   "Tiago V. Pereira" <tiago.pereira@mbe.bio.br>
To   statalist@hsphsun2.harvard.edu
Subject   st: How to maximize/minimize two equations in Stata
Date   Sun, 24 Apr 2011 15:03:56 -0300 (BRT)

Dear Statalisters,

I need to solve a problem in Stata, but I am not sure if Stata is capable
of solving that.

I have checked -nl- and optimize in Mata, but I am not sure if they do
what I am looking for.


The problem I have is the following:

(a*b+(1-a)*c)/((a^2)*d+((1-a)^2)*e+2*a*(1-a)*f) = X

((a^2)*d+((1-a)^2)*e+2*a*(1-a)*f)                     = Y

I need to compute the single parameter "a" in both equations 1 and 2 that
provides the largest value of X, while giving the smallest possible value
of Y. I have all remaining values: b,c,d,e and f.

I am asking you this question because I saw that both -nl- and optimize
set each equation to a specific value. In my case, I don't know the value
of X and Y. I am just interested in the largest possible value of X with
the smallest possible value of Y.


 I will be very grateful if you could provide me some advice/references.

All the best,

Tiago







*
*   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/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index