A method to handle missing data is with multivariate imputation by chained equations. During this process, we create many datasets (as many as you specify) with imputed values for the missing data. Then, models are fitted for each of the datasets and the estimated coefficients across all the fitted models are pooled to give the "final" pooled estimated coefficients.
I am not interested in interpreting these estimated coefficients. I would like to calculate a linear combination of the estimated coefficients from my model. My question is how should I do this calculation.
I see two major options on how to do this:
- Treat the estimated pooled coefficients as what I need, and calculate the linear combination from them.
- Calculate the desired linear combination for each imputed dataset and model, and then pool all the calculated linear combinations.
Are either of these options the correct method for calculating a linear combination of regression coefficients after performing multiple imputation by chained equations?
As an illustrative example:
I have used the mice package in R to impute a dataset and used the subsequent with() and pool() functions to produce a pooled estimate of regression coefficients. But I am not interested in the coefficients alone. I would like to calculate a linear combination of the estimated coefficients.
Context: logistic regression with three predictor variables
library(mice)
set.seed(123)
# Create the outcome variable
Y <- sample(c(0, 1), 100, replace = TRUE)
# Create the predictor variables
missing_prob <- 0.05
Animal <- ifelse(runif(100) < missing_prob, NA, sample(c("Cat", "Dog"), 100, replace = TRUE))
Size <- ifelse(runif(100) < missing_prob, NA, sample(c("Small", "Large"), 100, replace = TRUE))
X <- ifelse(runif(100) < missing_prob, NA, rnorm(100))
# Combine the variables into a data frame
data <- data.frame(Y, Animal, Size, X)
# Use MICE
imp <- mice(data)
fit <- with(imp, glm(Y ~ Animal*Size + X, family="binomial"))
pooled.fit <- pool(fit)
summary(pooled.fit)
So, can I use the output from summary(pooled.fit) to calculate my linear combination of, say, log-odds of Y=1 given Animal=Cat, Size=Large, and X=3? Or, should I calculate the desired linear combination for each imputed dataset found within the imp object and then pool all linear combinations?
A similar question was posed here and was closed.