MyNixOS website logo
Description

Imputation with 'mice' and Distributional Random Forests.

Provides a custom imputation method for the 'mice' package based on distributional random forests. The package implements the 'mice.impute.DRF' method, which can be used within the standard 'mice' workflow. Missing values are imputed by estimating conditional distributions with distributional random forests and sampling observed responses using forest weights.

miceDRF: Imputation with Distributional Random Forests in MICE

R-CMD-check

miceDRF provides an imputation method for the mice framework based on distributional random forests (DRF).

The package extends multiple imputation by chained equations (MICE) with a nonparametric approach that models conditional distributions rather than only conditional means. This allows flexible imputation of complex data structures, nonlinear effects, and heterogeneous conditional distributions.

The method can be used directly within the standard mice workflow via:

method = "DRF"

Installation

Install the development version from GitHub with:

if (!requireNamespace("devtools", quietly = TRUE)) {
  install.packages("devtools")
}

devtools::install_github("KrystynaGrzesiak/miceDRF")

Example

library(mice)
library(miceDRF)

set.seed(123)

# Generate data
n <- 200
d <- 5

X <- matrix(runif(n * d), nrow = n, ncol = d)

# Introduce missing values
pmiss <- 0.2

X.NA <- apply(X, 2, function(x) {
  U <- runif(length(x))
  ifelse(U <= pmiss, NA, x)
})

# Imputation with DRF
imp <- mice(X.NA, m = 1, method = "DRF")

Ximp <- complete(imp)

References

Näf, J., Scornet, E., & Josse, J. (2024). What is a good imputation under MAR missingness? arXiv preprint. https://arxiv.org/abs/2403.19196

Cevid, D., Michel, L., Näf, J., Meinshausen, N., and Buehlmann, P. (2022). Distributional random forests: Heterogeneity adjustment and multivariate distributional regression. Journal of Machine Learning Research, 23(333), 1–79.

Citation

If you use miceDRF in your research, please cite:

Näf, J., Grzesiak, K., and Scornet, E. (2025). How to rank imputation methods? arXiv preprint arXiv:2507.11297. https://doi.org/10.48550/arXiv.2507.11297

Metadata

Version

0.1.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