Re-parameterise.
Fit in terms of (say) q[1] = log p[1] and q[2] = log(p[2] + 1) and then
reverse after fitting.
(Several recent threads have touched on this.)
Nick
[email protected]
Bernd Albrecht
I try to run a nonlinear optimization with constraints using Mata.
The initial settings for the optimization include the following function
to
specify the constraints:
optimize_init_constraints(S, real matrix Cc)
where S=optimize_init() stores the default values.
The matrix Cc describes the constraints such that Cp'=c where p' is the
transpose of the parameter vector p.
(objective function: v=f(p) )
The problem I am facing refers to the equality sign in "Cp'=c".
Apparently,
the optimization function supports
only equality constraints.
However, I try to solve a program with inequality constraints. My
constraints are pretty simple such as p[1]>0
and p[2]>-1.
Is there a way to get around this problem?
*
* 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/