An R package for Errors-in-variables estimation in linear regression
install.packages("eive")
Please install devtools
package before installing eive
:
install.packages("devtools")
then install the package from the github repo using
devtools::install_github(repo = "https://github.com/jbytecode/eive")
Suppose the linear regression model is
where
We call
where
then the ordinary least squares (OLS) estimates are no longer unbiased and even consistent.
Eive-cga is an estimator devised for this problem. The aim is to reduce the errors-in-variable bias with some cost of increasing the variance. At the end, the estimator obtains lower Mean Square Error (MSE) values defined as
for the Eive-cga estimator. For more detailed comparisons, see the original paper given in the Citation part.
For the single variable case
> eive(dirtyx = dirtyx, y = y, otherx = nothing)
and for the multiple regression
> eive(dirtyx = dirtyx, y = y, otherx = matrixofotherx)
and for the multiple regression with formula object
> eive(formula = y ~ x1 + x2 + x3, dirtyx.varname = "x", data = mydata)
Note that the method assumes there is only one erroneous variable in the set of independent variables.
@article{satman2015reducing,
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},
volume={85},
number={16},
pages={3216--3235},
year={2015},
doi={10.1080/00949655.2014.961157}
publisher={Taylor \& Francis}
}