Announcement

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

  • Non-negative parameter constraints: nlsur

    Is it possible to impose non-negativity constraints on parameters in nlsur? That is, solution values of certain parameters can be zero but must not be negative.

  • #2
    So, suppose that the parameter you want to constrain to be non-negative is called b1. Then wherever {b1} occurs in your equation, replace it by exp({c}) (where c is not the name of another parameter in your model). Then after -nlsur- is done run -nlcom exp(_b[c:_cons])- to get your estimate of b1 = exp(c), which is thereby positive.

    You asked for non-negative, and I gave you positive. You could use b1 = c^2 as your transformation instead of exp(c), but playing around with that, you will find that when the unconstrained estimate of b1 is negative, you will pretty much always come up with c = 0 (hence b1 = 0) as the constrained estimate, which may or may not be how you want to do it.

    That said, if unconstrained estimation of b1 is giving you substantially negative values, you should be wary of constraining the model to either positivity or non-negativity: your data are telling you that they are not consistent with the constraint. If the unconstrained estimate of b1 is just slightly negative, then it's less of a problem to do that.
    Last edited by Clyde Schechter; 28 Feb 2016, 20:13.

    Comment


    • #3

      Thank you, that's very helpful.

      Comment

      Working...
      X