To apply the average treatment effect, I employ the matchthem package.
Although the dataset includes numeric and chatacteristic variables with too many NAs. Due to this, neither of mice or amelia is possible to apply.
My questions are:
1- How to overcome on endogeneity in a dataset with missing covariate values?
2- The treatment (DM) actually includes binary variables, but it returns below errod. How can I fix this?
library('mice')
imputed.datasets = mice(alldata)
imputed.datasets2 <- na.omit(imputed.datasets)
models <- matchthem(CL ~ DM, imputed.datasets2,
approach = "within",
method = "cem")
Matching Observations | dataset: #1Error: The treatment must be a binary variable.