I am trying to match a ~60k observation data set, where the treatment (annual days of sun exposure) is continuous. The data also has several confounders, some of which are continuous and some categorical.
I was trying to use the MatchIt
R package to get covariate balancing propensity scores (CBPS) but got an error message saying "The treatment must be a binary variable." Using the CBPS
package directly did work and the cobalt
package indicates that matching indeed yielded balance. But now I am unsure how to actually match the data.
library(CBPS)
cbps_out <- CBPS(days_of_sun ~ gender + race + age + state + history_of_cancer,
method = "exact",
data = df)
I was looking everywhere online, but there is such little information about matching with continuous treatments. I did find a great Gary King lecture where he advocated for coarsened exact matching (CEM) over propensity score matching and said it can work with continuous treatments if they are first coarsened. But unfortunately I couldn't find any additional information on this either.
If anyone has actually matched on a continuous treatment using either propensity scores or CEM and could share how it's done that would be so helpful.