CSLMI | R Documentation |
Performs multiple imputation and parameter estimation using a consensus-based approach. The response variable is in the first column, all other columns are predictors, missing values are automatically detected, the whole dataset is treated as one block.
CSLMI(data, M)
data |
Dataframe with response variable in 1st column and predictors in others |
M |
Number of imputations |
A list containing:
Yhat |
Imputed response values. |
betahat |
Average regression coefficients across imputations. |
comm |
Communication cost (number of messages passed). |
A list containing the following components:
Yhat |
Imputed response vector with missing values filled in. |
betahat |
Final regression coefficients. |
set.seed(123)
data <- data.frame(
y = c(rnorm(50), rep(NA, 10)),
x1 = rnorm(60),
x2 = rnorm(60)
)
result <- CSLMI(data = data, M = 10)
head(result$Yhat)
print(result$betahat)
print(result$comm)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.