DfiMI: Distributed Full-information Multiple Imputation (DfiMI)

View source: R/DfiMI.R

DfiMIR Documentation

Distributed Full-information Multiple Imputation (DfiMI)

Description

Perform multiple imputation of the response variable Y via R independent runs and M stochastic imputations per run. Missing values in Y are imputed by means of (intercept-adjusted) OLS regression on the complete predictors.

Usage

DfiMI(data, R, M)

Arguments

data

A data frame whose first column contains the response variable Y (possibly with NAs) and whose remaining columns contain numeric predictors.

R

Positive integer – number of simulation runs used to stabilise the coefficient estimates.

M

Positive integer – number of multiple imputations drawn within each run.

Details

This function implements a distributed full-information multiple imputation (DfiMI) approach. It iteratively imputes missing values in the response variable Y using OLS regression on the complete predictors. The process is repeated R times to stabilise the coefficient estimates, and within each run, M imputations are performed to account for the uncertainty in the imputation process.

Value

A named list with components:

Yhat

Numeric vector – the original Y with missing values replaced by their imputed counterparts.

betahat

Numeric vector – final regression coefficients (including intercept).

Examples

set.seed(123)
n  <- 60
data <- data.frame(
  Y  = c(rnorm(n - 10), rep(NA, 10)),  # 50 observed + 10 missing
  X1 = rnorm(n),
  X2 = rnorm(n)
)

res <- DfiMI(data, R = 3, M = 5)
head(res$Yhat)   # inspect imputed Y
res$betahat      # inspect coefficients

DLMRMV documentation built on Aug. 8, 2025, 6:27 p.m.

Related to DfiMI in DLMRMV...