0

I am trying to replicate a cem matching from Stata in R. As a first step I want to evaluate the imbalance. In R I used the following code:

vars <- c("X1PLTOT", "X1EBRSTOT",  "X1MTHETK2", "X1RTHETK2", "X1DCCSTOT", "X1NRWABL", "female", "latino", "white", "asian", "other", "rural", "ses")
imb <- imbalance(group=cem$elprgm, data = cem[vars])
View(imb$tab)

In Stata I used: global treat elprgm imb X1PLTOT X1EBRSTOT X1MTHETK2 X1RTHETK2 X1DCCSTOT X1NRWABL female latino white asian other rural ses , treatment($treat)

For all my variables Mean, SD, Min and Max are the same, thus I expected similiar imbalance measures in R and Stata. For my imbalance results mean differences are the same (just once negative and once positive) while the L1 values differ for four of my variables: X1MTHETK2, X1RTHETK2, X1NRWABL, ses

Imbalance results R Imbalance results Stata

I do not understand why there are differences for these four variables whereas results are similiar for the rest of my variables. I think the problem is in R since here one L1 value is 0.000 indicating perfect balance which is probably not the case. Do you have any idea what the problem might be?

Progman
  • 16,827
  • 6
  • 33
  • 48
Katharina
  • 31
  • 1

0 Answers0