I'm using MatchIt to perform time-varying propensity score matching. I estimate propensity scores and do nearest neighbour matching on those, as well as exact matching on a few variables (some which are used in the estimation of propensity scores, some which are not), as follows:
matches <- matchit(
## Estimate propensity scores and perform nearest neighbour matching on propensity scores
y ~ x1
+ x2
+ x3
+ x4
+ x5
, method = "nearest" # matching method: nearest neighbour matching (on propensity score)
, distance = "glm" # method for estimating the propensity score: 'glm' = logit
# Also perform exact matching on additional variables
, exact = ~ x3
+ x4
+ x6
, data = df
, s.weights = ~ sampling_weights
)
Balance is good across all variables, but it's not so good on the propensity scores.
I think that matching on percentiles of propensity scores would solve this problem. My understanding is that this could be achieved by changing the 'method' argument to:
method = "subclass", subclass = 100
However, I don't think it's possible to use method = subclass
while exact matching on other variables.
Can anyone say if it's possible to match on percentiles of propensity scores, while exact matching on other covariates using MatchIt?
Edited for clarity