Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • non-linear optimisation with linear restrictions

    Dear all: I need to find the B vector that minimises the following non-linear function (B-A)*IM*(B-A) such that a linear restriction (also involving the vector B) is fulfilled. It is not necessary to write the restriction in this post. A is the vector of coefficients from my non-restricted model and IM is the inverse of the var/cov matrix from my non-restricted model.
    Is it possible to do this in Mata? I use Stata 15. I haven't found any tutorial nor examples of this. I would appreciate your advice ... Many thanks, Juan

  • #2
    You should be able to do this with Mata's moptimize() routine that allows to specify constraints with function moptimize_init_constraints() and the Gauss-Newton algorithm for quadratic optimization with moptimize_init_technique(gn). You need to write a "type q evaluator" program. The inverse covariance matrix is then the weighting matrix specified with function moptimize_init_gnweightmatrix().

    See help mata moptimize for details.
    https://twitter.com/Kripfganz

    Comment


    • #3
      Thank you very much Sebastian. I started taking a look at this and it seems the command is capable of performing this operation. Thank you again. Juan

      Comment

      Working...
      X