Hi all,

I am trying to create a small table where I test if covariates are balanced across two groups, called "gain" and "loss". I have done it for these two groups, which together add to my whole sample (as a test as I expect the covariates to be balanced). Here is the code I used.

Code:
label define loss 0 "Gain" 1 "Loss"
label values loss loss
*table1
table1 , by(loss) vars(DonationCont conts \ DonationDic bin \donation_miss contn\  USA bin\  visit bin \  pasthighdonors bin) saving(table1_loss.xlsx, replace)
Now I basically want to run similar tests in a table, but I am interested in doing it for two subgroups of my sample,lets call them "gain compliers" and "loss compliers". I cant seem to do it using by.. or maybe I am missing something easy here.


Sorry in advance!