# Conditional logit regression -solved using cox regression

**URL:** https://discourse.julialang.org/t/conditional-logit-regression-solved-using-cox-regression/28615
**Category:** Statistics
**Created:** [September 10, 2019, 4:36pm UTC](https://discourse.julialang.org/t/conditional-logit-regression-solved-using-cox-regression/28615 "2019-09-10T16:36:21Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![Nosferican](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/nosferican/32/9275_2.png) [@Nosferican](https://discourse.julialang.org/u/Nosferican)
#### Post date: [September 11, 2019, 8:40pm UTC](https://discourse.julialang.org/t/conditional-logit-regression-solved-using-cox-regression/28615/8 "2019-09-11T20:40:04Z")

</div>

Do you have any resources or good inspiration for an implementation based on `mlogit`/`polr`? The infrastructure has been developed for those so I suppose it would only take some flavor syntax,

```julia
@formula(response | options ~ id | explanatory variables)

```

Maybe something like that where the table looks like (for the cmlogit)

```julia
outcome option id price income
true train 1 $50 $60,000
false flight 1 $500 $60,000

```

Then we would only have to adapt the objective function (conditional log-likelihood) and compute the gradient. For ologit, I had to use a trick for the AD to work properly (inspired on the MASS implementation).

---

_[View the full topic](https://discourse.julialang.org/t/conditional-logit-regression-solved-using-cox-regression/28615)._
