View source: R/outliers_missing_treatment.R
This function is not intended to be used by end user.
1 2 3 4 5 6 7 8 9 10 11 |
dat |
A data.frame with independent variables. |
x |
The name of variable to process. |
nas_rate |
A list contains nas rate of each variable. |
mat_nas_shadow |
A shadow matrix of variables which contain nas. |
dt_nas_random |
A data.frame with random nas imputation. |
k |
Number of neighbors of each obs which x is missing. |
scale |
Logical.Standardization of variable. |
method |
The methods of imputation by knn. "median" is knn imputation with k neighbors median, "avg_dist" is knn imputation with k neighbors of distance weighted mean. |
miss_value_num |
Default value of missing data imputation for numeric variables, Defualt is -1. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.