AVGM: Averaged Generalized Method of Moments Imputation (AVGM)
Description
This function performs multiple imputations on missing values in the response variable Y,
using AVGMMI logic with support for grouped data. It is fully self-contained.
Usage
AVGM(data, M, midx = 1)
Value
A list containing:
betahat
Final averaged regression coefficient estimates.
Yhat
Imputed response variable with all missing values filled in.
comm
Completion flag (1 = success).
Arguments
data
A data frame where the first column is the response variable (Y), and others are predictors (X).
M
Number of multiple imputations.
midx
Integer indicating which column is the response variable (default = 1).