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]

# Re: st: Optimize

 From Austin Nichols <[email protected]> To [email protected] Subject Re: st: Optimize Date Mon, 23 Jul 2012 10:25:57 -0400

```Mohamud Hussein <[email protected]>:
Looks like you are trying to maximize the unbounded quadratic rather
than find its zeros.  Use a root finder instead e.g.
http://www.stata.com/statalist/archive/2007-12/msg00551.html
http://www.stata.com/statalist/archive/2009-01/msg01140.html
but note first that the particular example you gave has no zeros (so
no interior solution).

On Sun, Jul 22, 2012 at 9:59 AM, Mohamud Hussein
<[email protected]> wrote:
> Hi there,
>
> I am trying to run a model for a marginal cost curve equation based on the traditional cubic total cost curve function (i.e. y= x^3+X^2+X+c) using Stata's optimize() command. The goal is to estimate the value of x which minimises y subject to a number of constraints.
>
> When I tried to specify the marginal cost curve function in mata directly as y=3x^2+2x+1 (i.e. first derivative of the total cost equation) I got the following message:
>
> Iteration 0:   f(p) =          1  (not concave)
> Iteration 1:   f(p) =  7.911e+71  (not concave)
> Iteration 2:   f(p) =  1.95e+169  (not concave)
> Iteration 3:   f(p) =  8.32e+250  (not concave)
> Iteration 4:   f(p) =  1.62e+288  (not concave)
> Iteration 5:   f(p) =  2.34e+306
> Hessian is not negative semidefinite
>
> I have never used Stata's mata programming language before and am not quite sure of what do here? Grateful if someone can help me on this.
>
> Thanks,
> Mohamud

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index