pmm_donor_selection: Score-based PMM donor selection

View source: R/helper_vimpute.R

pmm_donor_selectionR Documentation

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"
)

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

Value

Numeric vector of length(score_miss) with imputed values


VIM documentation built on Sept. 2, 2026, 5:07 p.m.