Dear Statalist Community,

I'm looking to make a summary statistics table for some of my key variables; however, I'm looking to do so for treated vs. non-treated individuals and for men/women/all.

Ideally, the table would look something like so:
Treated Non-Treated t-test n
Variable Name
Men
Women
All
Variable Name 2
...
I have variables configured for treatment / non-treatment, as well as a male dummy variable. I can get the variable summarized into columns using by(treated), but I can't for the life of me figure out how to break down the variables vertically by another variable (and how to include an "all" option).

I would appreciate any advice, thank you!

Best,
James