Announcement

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

  • How to express a more complex constraint in Mata?

    Hello! I have a minimization problem with 5 parameters to be estimated: miu[1], miu[2], sigma[1], sigma[2] and pb[1].

    The restriction I need to introduce in my code is:

    pb[1]*miu[1] + (1-pb[1])*miu[2] = 0

    I've tried to express it this way:

    Code:
    C = (miu[1]-miu[2], 0, 1, 0, 0)
    c = (0)
    Cc = (C, c)
    optimize_init_constraints(S, Cc)
    However, when I run it, STATA replies: "<istmt>: 3499 miu not found"

    What am I doing wrong?

    Thanks!
Working...
X