I have a dataset with a couple of missing values and would need to run a propensity score matching using the variable 'y' as Treatment variable and x1, x2 and x3 as variables for adjustment. By using the following code with Matchit
ModMatch <- matchit(y ~ x1+x2+x3, method = 'nearest', data = data)
I obtain the error 'Missing values exist in the data'
I have therefore tried to run a multiple imputation using mice:
ImputedDF <- mice(data)
ModMatch <- matchit(y ~ x1+x2+x3, method = 'nearest', data = ImputedDF)
And I get the error 'cannot coerce an object of class mids to a dataframe'. I would probably need a way to print an imputed data frame, could anyone know if that is possible?