metric to be used for calculating the distances between
k
number of Nearest Neighbours used
dist_var
names or variables to be used for distance calculation
weights
weights for the variables for distance calculation
numFun
function for aggregating the k Nearest Neighbours in the case
of a numerical variable
catFun
function for aggregating the k Nearest Neighbours in the case
of a categorical variable
makeNA
list of length equal to the number of variables, with values, that should be converted to NA for each variable
NAcond
list of length equal to the number of variables, with a condition for imputing a NA
impNA
TRUE/FALSE whether NA should be imputed
donorcond
condition for the donors e.g. ">5"
mixed
names of mixed variables
mixed.constant
vector with length equal to the number of
semi-continuous variables specifying the point of the semi-continuous
distribution with non-zero probability
trace
TRUE/FALSE if additional information about the imputation
process should be printed
imp_var
TRUE/FALSE if a TRUE/FALSE variables for each imputed
variable should be created show the imputation status
imp_suffix
suffix for the TRUE/FALSE variables showing the imputation
status
addRandom
TRUE/FALSE if an additional random variable should be added
for distance calculation
useImputedDist
TRUE/FALSE if an imputed value should be used for distance calculation for imputing another variable.
Be aware that this results in a dependency on the ordering of the variables.
Details
The function sampleCat samples with probabilites corresponding to the
occurrence of the level in the NNs. The function maxCat chooses the level
with the most occurrences and random if the maximum is not unique. The
function gowerD is used by kNN to compute the distances for numerical,
factor ordered and semi-continous variables. The function which.minN is used
by kNN.