View source: R/helper_vimpute.R
| pmm_donor_selection | R Documentation |
For each missing value, finds k nearest observed values based on model score (predicted value) distance, then aggregates using the chosen method.
pmm_donor_selection(
y_obs,
score_obs,
score_miss,
k = 1L,
agg_method = "random"
)
y_obs |
Observed values of target variable |
score_obs |
Model scores for observed rows |
score_miss |
Model scores for missing rows |
k |
Number of nearest donors |
agg_method |
One of "mean", "median", "random", or a function |
Numeric vector of length(score_miss) with imputed values
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.