Description Usage Arguments Value Examples
This function returns a list of m complete datasets, where the missing values are imputed using a bi-objective kNN method. It assumes that the class variable name is known, and the rest of the variables are numerical.
1 2 3 4 5 6 7 8 9 10 | biokNN_impute_mi(
data,
className,
varNames,
m = 5,
nIter = 10,
alpha = 0.5,
k = 10,
distance = "gower"
)
|
data |
A dataframe with missing values |
className |
name of the variable that contains the classes |
varNames |
vector with the names of the variables to be imputed |
m |
number of imputations |
nIter |
number of iterations, default = 10 |
alpha |
weight of the kNN values in the objective function, default = 0.5 |
k |
number of nearest neighbours, default = 10 |
distance |
distance function used to get the k-nearest neighbors |
A dataframe with the imputed data
1 2 3 4 5 6 7 8 9 10 11 | data(data_example)
complete_data_mi <- biokNN_impute_mi(data.example,
className = "class",
varNames = c("y"),
m = 3,
nIter = 10,
alpha = 0.9,
k = 15,
distance = "gower")
# View completed data sets
str(complete_data_mi)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.