IQSS / cem

17 stars 5 forks source link

Question about different results for L1 imbalance measure in R and Stata #22

Open Katzi90 opened 2 years ago

Katzi90 commented 2 years ago

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)

I used the same dataset 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

I do not understand why there are differences for these four variables whereas results are similiar for the rest of my variables. Do you have any idea what the problem might be?

Imbalance_Stata Imbalance_R

Katzi90 commented 2 years ago

I was wondering whether this issue is related to a previous issue: L1 of continuous variables seem to be incorrect? #1 So was there any progress yet? L1 measures in Stata and R still seem to vary substantially?