Censored regression and IV models?


#1

Does julia already have a package suited to censored regression models, as in https://en.wikipedia.org/wiki/Tobit_model ?

(PS: InstrumentalVariables? Giuseppe Ragusa’s package is no longer working—and it is not in the repository, either.)


#2

I haven’t tried this particular model but I think this should be very possible to express in Turing.jl if you don’t mind writing your model down explicitly. It’s my go-to package in Julia for regression modeling. In R I typically go with RStan.


#3

It might not be too bad to fix it. Did you check with v0.7? He seems to be refactoring covariancematrices.jl, so maybe he’ll get around to IV after that?)


#4

I would also prefer this approach, but note that for IV there are various caveats one should keep in mind. See eg

@article{lopes2014bayesian,
  title={Bayesian instrumental variables: priors and likelihoods},
  author={Lopes, Hedibert F and Polson, Nicholas G},
  journal={Econometric Reviews},
  volume={33},
  number={1-4},
  pages={100--121},
  year={2014},
  publisher={Taylor \& Francis}
}

#5

A function which will do IV, if you frame it as GMM, is here: https://github.com/mcreel/Econometrics.jl/blob/master/src/GMM/gmm.jl

An example of usage, for a Hansen-Singleton type model, is here: https://github.com/mcreel/Econometrics/blob/master/Examples/GMM/portfolio.jl

Another example is here: https://github.com/mcreel/Econometrics/blob/master/Examples/GMM/MeasurementErrorIV.jl

By the way, I would like to make this function accept a dataframe and perhaps a formula, rather that the name of the moments function, but I need to think about how general moment conditions can be specified using formulae.


#6

It is not so much for me, as for my cookbook. I know there will be students looking for it. so, I need something simple to use. (thanks, michael, but GMM formulations exceed student starters.)

I dropped Giuseppe a note. maybe it will resurrect.

PS: personally, I am not a great fan of IV regressions in many cases in which I have seen them. there are few clear (real-world) cases that are obvious, except in theory. (this is not at all to say that they are useless, but they are difficult. yet, many users regard them like heteroskedasticity corrections, something to chalk off a list, and think very little about what their instrumental variables have to mean and what they are doing.)


#7

How about https://github.com/matthieugomez/FixedEffectModels.jl ? I haven’t tried it, but it advertises IV with a Stata like syntax.

dependent variable ~ exogenous variables + (endogenous variables ~ instrumental variables)