Announcement

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

  • Impose constraint on free parameter from ml estimation

    I am using the constraint

    Code:
    constraint define 1 delta < 1
    (or also "/delta" does not work)

    which does not work because delta is free parameter in the ml estimation

    Code:
    ml model gf0 nl_tobit /gamma1 /lambda /gamma0 /delta /sigma, constraints(1)
    How to reference such a parameter in the constraint?

  • #2
    https://www.stata.com/support/faqs/s...l-constraints/
    ---------------------------------
    Maarten L. Buis
    University of Konstanz
    Department of history and sociology
    box 40
    78457 Konstanz
    Germany
    http://www.maartenbuis.nl
    ---------------------------------

    Comment


    • #3
      Hm, I did not get it from this link.

      Comment


      • #4
        the command `constrain` does not handle nonlinear constrains. To impose that (if you really think they should be imposed) you need to use transformations

        Example:
        - Sigma needs to be positive. So instead of estimating sigma, you estimate logSigma. Exp(logsigma) will always be positive
        - p needs to be between 0 and 1. Then you need to estimate xb, and use the transformation exp(xb)/(1+exp(xb)) . The transformation will be between 0 and 1.

        For your case, perhaps:
        you want delta to be less than 1
        then estimate d_1 where delta = 1-exp(d_1)

        F

        Comment

        Working...
        X