By default when calling controlOut epsilon value is set to 1e-6 which is a sensible choice FOR stats::glm but this epsilon value is also used for fitting RANN::nn2(). The default eps in RANN::nn2() is set to 0, this is because when eps = 0RANN::nn2 performs exact nearest neighbour search but when eps > 0 and appropriate solution is used.
This leads to worse results (as presented in code bellow) in predictive mean matching (ditto for kNN imputation) and can be confusing and users would probably expect the default to be set to an exact solution
By default when calling
controlOut
epsilon value is set to1e-6
which is a sensible choice FORstats::glm
but thisepsilon
value is also used for fittingRANN::nn2()
. The defaulteps
inRANN::nn2()
is set to0
, this is because wheneps = 0
RANN::nn2
performs exact nearest neighbour search but wheneps > 0
and appropriate solution is used.This leads to worse results (as presented in code bellow) in predictive mean matching (ditto for kNN imputation) and can be confusing and users would probably expect the default to be set to an exact solution