MyNixOS website logo
Description

Proper Scoring Rules for Missing Value Imputation.

Provides tools for evaluating and ranking missing value imputation methods using proper scoring rules. Implements the Energy-I-Score and the DR-I-Score for the assessment of deterministic, stochastic and multiple imputation methods for numerical and mixed datasets, following Näf et al. (2022) <doi:10.48550/arXiv.2106.03742> and Näf et al. (2025) <doi:10.48550/arXiv.2507.11297>.

Iscores

CRAN status Lifecycle: experimental R-CMD-check

Iscores provides scoring rules for evaluating and comparing imputation methods.

The package implements the methodology introduced in Näf et al. (2022) and Näf, Grzesiak, and Scornet (2025). The package supports:

  • numerical datasets,
  • mixed numerical and categorical data,
  • deterministic imputations,
  • stochastic and multiple imputations,
  • comparison of several imputation methods.

For more details about the energy-I-Score check our vignettes:


Installation

CRAN

install.packages("Iscores")

Development version

install.packages("devtools")

devtools::install_github("missValTeam/Iscores")

Basic workflow

The package evaluates user-defined imputation methods.

An imputation function must:

  • accept a dataset with missing values,
  • return a completed dataset with the same dimensions.

Below we define a simple zero-imputation method.

library(Iscores)

impute_zero <- function(X) {

  X[is.na(X)] <- 0

  X
}

We now generate example data with missing values.

set.seed(10)

X <- Iscores:::random_mcar_data(100, 4)

head(X)

Energy-I-Score

The energy_IScore() function evaluates the quality of an imputation method.

sc <- energy_IScore(
  X = X,
  imputation_func = impute_zero,
  N = 10,
  silent = TRUE
)

sc

Detailed variable-level results are stored as an attribute:

attr(sc, "dat")

DR-I-Score

The package also provides the density-ratio based DR-I-Score.

sc_dr <- DR_IScore(
  X = X,
  imputation_func = impute_zero,
  m = 3,
  n_proj = 10,
  n_trees_per_proj = 2,
  n_cores = 1
)

sc_dr

Comparing imputation methods

Several methods can be compared simultaneously using compare_Iscores().

library(mice)

impute_mice_norm <- function(X) {

  imp <- mice(
    X,
    m = 1,
    method = "norm",
    maxit = 5,
    printFlag = FALSE
  )

  complete(imp)
}

impute_mice_rf <- function(X) {

  imp <- mice(
    X,
    m = 1,
    method = "rf",
    maxit = 5,
    printFlag = FALSE
  )

  complete(imp)
}

methods_list <- list(
  zero = impute_zero,
  norm = impute_mice_norm,
  rf = impute_mice_rf
)

compare_Iscores(
  X = X,
  methods_list = methods_list,
  score = c("energy_IScore", "DR_IScore"),
  N = 10,
  m = 3,
  silent = TRUE
)

Documentation

See the vignette for a complete introduction:

vignette("Example_IScore")

References

Näf, Jeffrey, Krystyna Grzesiak, and Erwan Scornet. 2025. “How to Rank Imputation Methods?” https://arxiv.org/abs/2507.11297.

Näf, Jeffrey, Meta-Lina Spohn, Loris Michel, and Nicolai Meinshausen. 2022. “Imputation Scores.” https://arxiv.org/abs/2106.03742.

Metadata

Version

1.2.0

License

Unknown

Platforms (79)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    wasip1
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-linux
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • sh4-linux
  • vc4-none
  • wasm32-wasip1
  • wasm64-wasip1
  • x86_64-cygwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-uefi
  • x86_64-windows