Announcement

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

  • Conditional Logit with Nonlinear Constraints

    Dear All,

    I am trying to build maximum likelihood estimator for conditional logit, with nonlinear constraints on parameters. Until now, I am able to write a method d0 program that has the same results as the `clogit' command in stata.

    Now, I am trying to impose nonlinear constraint on parameters, however I am not able to do it.

    My maximum likelihood estimator for conditional logit is as below:

    program myconditional_logit
    args todo b lnL
    version 11
    tempvar den xb p last
    mleval `xb' = `b', eq(1)
    quietly{
    by strata : egen double `den' = sum(exp(`xb'))
    gen double `p' = exp(`xb')/`den'
    mlsum `lnL' = $ML_y1*log(`p') if $ML_y1==1
    if (`todo'==0 | `lnL' > =.) exit

    }
    end

    ml model d0 myconditional_logit (Eq1: choice = x1 x2 x3 x4 x5 x6 x7 x8 , nocons)

    Here, what I need to impose is that ;

    constraint : [choice]_x2/[choice]_x3 = [choice]_x4 / [choice]_x5

    Is there anyone who can help me with imposing this, or can suggest me a source I can look and try to do it ?

    Any help would be appreciated.

    Thank you for your help,

    Sinem
    Last edited by Sinem Bas; 20 Sep 2015, 10:31.

  • #2
    Dear all,

    I am facing the same problem as Sinem; I would like to impose a nonlinear constraint to a conditional logit optimization (I am currently using "cmclogit").
    Is it possible to do so with a STATA command, or should I program the optimization myself?

    Thank you very much in advance!

    Best,
    Laureen

    Comment

    Working...
    X