ietoolkit
ietoolkit copied to clipboard
iebaltab: balance tests for different values of a categorical variable
I'm doing balance tests on a single variable for different values of a categorical variable, which means using different if statements. I couldn't find a quick way to do that and have them all in a single table. Is there a way to do that?
If not, maybe it could be interesting to add something like an over(varname) option? Or simply add append as an option when saving the file?
We wont do this until a complete re-write of iebaltab.
@kbjarkefur @luizaandrade Hi guys, am I right in assuming that balance tests for different values of a categorical variable is not possible yet in iebaltab? Just came across this conversation here because I'm writing my Bachelor thesis and this option would help me a lot.
Hi @feamberg ! Thanks for your feedback! Yes, this is unfortunately not possible yet. iebaltab is using some old code that is working well but is a pain to update. So after the next release of ietoolkit we will start working on a big re-write of the command where we will include this functionality and allow us to quicker add new features in the future.
You may have thought of this already, but you can use if to get the same results with the current version of the command, although you would have to stitch the tables together manually. The example below shows how you would create three tables, one for gender being 1, once for gender being 0 and one for total. This will eventually be a built in functionality in iebaltab.
iebaltab var1 var2 var3 if gender == 1 , grpvar(tmt) [...]
iebaltab var1 var2 var3 if gender == 0 , grpvar(tmt) [...]
iebaltab var1 var2 var3 , grpvar(tmt) [...]
I hope this was helpful anyways and good luck with your thesis!
Thank you for this quick feedback. Yes I have already thought of this, but thanks anyway. I just wanted to check before I start putting tables together manually.