Closed BERENZ closed 2 months ago
Thanks for letting me know about this! quantile
can indeed be used with CBPS but I did forget to document it. It is now correctly documented.
Thanks! Do you think that it will be possible to balance only to quantiles not moments of a given variable? Say I would like to balance only to medians but not means.
That's a good question. I hadn't considered that as a possibility but it's definitely something I could add. I'll look into that and get back to you.
I made this change and it should work now! You can set moments = 0
and supply an argument to quantile
to request balance on the quantiles but not the means. This will fail to balance any categorical variables, though, since those are ignored by quantile
. I would recommend balancing both means and quantiles if possible; usually the cost to balancing the means is not much higher than the quantiles.
Great! I will test it after the weekend. The basic idea behind this is that in a simple case say y= a+a_1x and x is continuous then calibrating weight to $\alpha$-quantile of x gives you exactly the $\alpha$-quantile of y. So you can estimate quantile treatment effect using linear regression (now I work on the multivariate case to show how it works in such setting). Does this change affect other methods such as ebal
or ipt
?
Yes, all methods that accept quantile
can be used to balance only the quantiles and not the means. This includes cbps
, nbcbps
, ebal
, optweight
, ipt
, and energy
.
In the documentation is it not stated that
quantile
argument can be used with themethod_cbps
. However, if you provide this argumentmethod_cbps
returns weights that balance on user specified quantiles.See the code that shows this issue for the ATT estimand (results are exactly the same as noted by Słoczyński et al (2024))
For the
d.moments
argument the results are exactly the same as without this argument. No problem here.I'm actually quite pleased that the quantile argument works for the CBPS method. So, I opt for leaving the
quantile
argument for the CBPS. :)