Learn R Programming

VIM (version 7.3.0)

pmm_donor_selection: Score-based PMM donor selection

Description

For each missing value, finds k nearest observed values based on model score (predicted value) distance, then aggregates using the chosen method.

Usage

pmm_donor_selection(
  y_obs,
  score_obs,
  score_miss,
  k = 1L,
  agg_method = "random"
)

Value

Numeric vector of length(score_miss) with imputed values

Arguments

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