AVGM {DLMRMV} | R Documentation |
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)
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). |
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). |
Examples
set.seed(123)
data <- data.frame(
y = c(rnorm(50), rep(NA, 10)),
x1 = rnorm(60),
x2 = rnorm(60)
)
result <- AVGM(data, M = 10)
head(result$Yhat)
[Package DLMRMV version 0.2.0 Index]