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]
Mohamud Hussein <Mohamud.Hussein@fera.gsi.gov.uk>
Sun, 22 Jul 2012 14:59:08 +0100
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.
Food and Environment Research Agency (Fera)
Sand Hutton, York, YO41 1LZ
Tel: +0044(0)1904 462787
The information contained in this message may include privileged, proprietary or confidential information. Please treat it with the same respect that you would expect for your own information. If you have received it in error, we apologise and ask that you contact the sender immediately and erase it from your computer. Thank you for your co-operation.
The original of this email was scanned for viruses by the Government Secure Intranet virus scanning service. On leaving the GSi this email was certified virus free.
* For searches and help try: