The EIVE-CGA Estimator for Multivariate Case

eive

ErrorsInVariables.Eivem.meiveFunction
eive(;
dirtyx::Vector{T},
y::Matrix{T},
otherx::Union{Nothing, Matrix{T}, Vector{T}},
popsize::Int = 50,
numdummies::Int = 10,
rng::RNGType = MersenneTwister(1234))::SimpleEiveResult where {T<:Real, RNGType<:AbstractRNG}

Description:

This is the multivariate case of eive(). Please see eive() function. In the multivariate case, the y is not vector, but a matrix of multiple or repeated measurements of the response variable. This can be considered as multivariate regression as well as regressions with repeated measurements.

Arguments:

  • dirtyx: Independent variable measured with some error
  • y: nxp matrix of dependent variables where n is the number of observations and p is the number of dependent variables
  • otherx: Matrix of other independent variables
  • popsize: Number of individuals in the population (optional)
  • numdummies: Number of dummy variables to use (optional)
  • rng: Random number generator (optional)

Examples

julia> import Random
julia> using ErrorsInVariables
julia> rng = Random.MersenneTwister(1234)
julia> n = 30
julia> deltax = randn(rng, n) * sqrt(3.0)
julia> cleanx = randn(rng, n) * sqrt(7.0)
julia> e1 = randn(rng, n) * sqrt(5.0)
julia> e2 = randn(rng, n) * sqrt(5.0)
julia> y1 = 20.0 .+ 10.0 .* cleanx .+ e1
julia> y2 = 10.0 .+ 15.0 .* cleanx .+ e2
julia> dirtyx = cleanx + deltax

julia> # Getting bias-reduced estimates
julia> meive(dirtyx = dirtyx, y = hcat(y1, y2), otherx = nothing) 

EiveResult([19.65449584842238, 9.21108792897651])

julia> X = hcat(ones(n), dirtyx);

julia> # Biased OLS estimates:
julia> X \ y1
2-element Vector{Float64}:
17.94867860059858
  5.8099584879737876

References

Satman, M. Hakan, and Erkin Diyarbakirlioglu. "Reducing errors-in-variables bias in linear regression using compact genetic algorithms." Journal of Statistical Computation and Simulation 85.16 (2015): 3216-3235.

Satman, M. H., & Diyarbakırlıoğlu, E. (2024). A Solution to Errors-in-variables Bias in Multivariate Linear Regression using Compact Genetic Algorithms. JOURNAL OF APPLIED MICROECONOMETRICS, 4(1), 31-64. https://doi.org/10.53753/jame.2293