When matching using IPTW and logistic regression, the outcome~treatment*matching_variables model returns the following error:
"Error: Unable to compute predicted values with this model. This error can arise when insight::get_data() is unable to extract the dataset from the model object, or when the data frame was modified since fitting the model. You can try to supply a different dataset to the newdata argument. In addition, this error message was raised: Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'drop': non-conformable arguments Bug Tracker: https://github.com/vincentarelbundock/marginaleffects/issues"
Update: it has something to do with the covariates that are added to the model. When I remove the highly correlated matching variables (i.e., those flagged in the "Validate Data" step), the model runs fine.
When matching using IPTW and logistic regression, the
outcome~treatment*matching_variables
model returns the following error:"Error: Unable to compute predicted values with this model. This error can arise when
insight::get_data()
is unable to extract the dataset from the model object, or when the data frame was modified since fitting the model. You can try to supply a different dataset to thenewdata
argument. In addition, this error message was raised: Error in h(simpleError(msg, call)): error in evaluating the argument 'x' in selecting a method for function 'drop': non-conformable arguments Bug Tracker: https://github.com/vincentarelbundock/marginaleffects/issues"