Nosferican / Econometrics.jl

Econometrics in Julia
https://nosferican.github.io/Econometrics.jl/dev
ISC License
69 stars 19 forks source link

Iterative rectifier (IR) #5

Open Nosferican opened 5 years ago

Nosferican commented 5 years ago

Correia (@sergiocorreia), Guimarães (@pguimaraes99), and Zylkin (2019).

The idea would be to implement the model specific corrections à la proposed iterative rectifier way for the count/rate, duration, and categorical response models.

Sergio, could you share the slides from the presentation with the software comparisons and different scenarios data? I read the v4 of the paper (2019-04-19). If there is a newer version I would love to check it out. If any of the group has drafted some version of an implementation y'all could share that would be appreciated as well.

sergiocorreia commented 5 years ago

Hi!

I'm attaching the slides. seattle2019.pdf

Slide 13 has the pseudocode, which is also on p38 of the paper. We are working on a v5 version of the paper, but it won't be out for a couple of weeks.

Other useful documents are the primer, as well as the benchmarks which include 18 example datasets and comparisons with Stata/R/Julia/Matlab.

Regarding the Julia implementation, I would start by first just adding an ex-post warning in case of perfectly predicted observations where $y$ is at the boundary (i.e. observations where $\mu_i < \varepsilon$ and $y=0$). Then, as an improvement the ex-ante fixes can be added.

Also relevant is this issue from a while ago, which you commented.

Cheers, Sergio

Nosferican commented 5 years ago

@pkofod, would this be something of interest to handle at the Optim.jl or at an extension level?

pkofod commented 5 years ago

I’ll have a look!

Nosferican commented 4 years ago

@pkofod let me know if this is something that might be worthwhile discussing in the rewrite at NLsolve.jl.

pkofod commented 4 years ago

Would it maybe be better suited for GLM.jl? Or is it because you want it at a level where you don't have to depend on GLM?

Nosferican commented 4 years ago

This would be at solver level, otherwise every package that uses an optimization solver for regression analysis would have to implement it at as well or modify the solver for it. GLM.jl uses a self-contained IRLS which doesn't use any optimization library. The idea is for cases when the data suggests a parameter estimate is -∞ or to estimate it as such (e.g., linearly separable for cases in discrete choice, but also for count/rate models) and estimate the remaining parameters à Correia, Guimarães, Zylkin (2019) rather than throw an error saying it failed to converge.

pkofod commented 4 years ago

Okay, so maybe my skim-reading was a bit too..skimming.. So is it possible for you to summarize what they are suggesting?

Nosferican commented 4 years ago

I could try, but maybe best to check out the slides Sergio shared? I think those are good at explaining the problem, alternatives, and approach.