Error in variables linear regression

how can I do an error in variables regression in Julia? I didn‘t find anything online about this and I don‘t know what to do with the measurement uncertainties when I want to fit my model.

Have a nice day and thank you for all replies.

1 Like

You could use
but it’s a rather low-level interface

1 Like

I haven’t registered in the Julia package registry, but it is quite ready to use. It implements a specific estimator/algorithm (mainly compact genetic algorithm optimization based).

Here is the repository:

And will be registered soon. file is a good start while we are generating a more comprehensive documentary. You can install it by typing

julia> ]


julia> ]
add ErrorsInVariables

now works!

Sorry for asking, but is this an instrumental variable (or 2SLS) approach?

1 Like

Thanks for the question, no worries.

The package simply implements the algorithm (estimator) defined in the paper

  title={Reducing errors-in-variables bias in linear regression using compact genetic algorithms},
  author={Satman, M Hakan and Diyarbakirlioglu, Erkin},
  journal={Journal of Statistical Computation and Simulation},
  publisher={Taylor \& Francis}

It is similar to 2SLS but the exploratory variables are automatically generated to reduce mean square error of regression estimators by reducing the bias with a smaller increase on the variance. Results are compared with the OLS counterparts by simulations.

Thanks. This means that I have to read up, but probably after my teaching period. My initial guess would be that IV/2SLS/the new stuff could all fit in such a package. Just to give the users some options. But, as I said, I really should read up before saying too much…

1 Like

You’re totally right. Mainly, the R package eive (CRAN - Package eive) was the reference implementation for this estimator. But Julia package naming conventions didn’t allow me to select Eive.jl as the name. So I finally ended up with ErrorsInVariable.jl.

Your contributions are welcome.