DAVGMMI: Impute Missing Values in Response Variable Y Using...

View source: R/DAVGMMI.R

DAVGMMIR Documentation

Impute Missing Values in Response Variable Y Using Distributed AVGMMI Method (With Grouping)

Description

This function implements the Distributed Averaged Generalized Method of Moments Imputation (DAVGMMI) to fill in missing values in the response variable Y based on observed covariates X. Assumes a single group structure and does not require group size input ('n').

Usage

DAVGMMI(data, R, M)

Arguments

data

A data frame or matrix where the first column is the response variable Y (may contain NA), and remaining columns are covariates X.

R

Number of simulations for stable Beta estimation.

M

Number of multiple imputations.

Value

A list containing:

Yhat

The vector of Y with missing values imputed.

betahat

Final averaged regression coefficient estimates used for imputation.

Examples

set.seed(123)
data <- data.frame(
  y = c(rnorm(50), rep(NA, 10)),
  x1 = rnorm(60),
  x2 = rnorm(60)
)
result <- DAVGMMI(data, R = 50, M = 10)
head(result$Yhat)


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

Related to DAVGMMI in DLMRMV...