| DAVGMMI | R Documentation | 
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').
DAVGMMI(data, R, M)
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.  | 
A list containing:
Yhat | 
 The vector of Y with missing values imputed.  | 
betahat | 
 Final averaged regression coefficient estimates used for imputation.  | 
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.