Dear Statalist,
I want to do a cross table, which displays the means of the variable wage. The two other variables are sex and nationality. It works with:
But I also want to display the respective obervations/cases for every combination of sex and nationality - accordingly per mean one number of observations/cases. How can I do this?
Up to now I display the respective number of cases with:
But I hope there's a more simple solution. 
best regards,
Sam Peters
I want to do a cross table, which displays the means of the variable wage. The two other variables are sex and nationality. It works with:
table sex nationality, c(mean wage)
Up to now I display the respective number of cases with:
sum wage if nationality==1 & sex==0|sex==1
sum wage if nationality==2 & sex==0|sex==1
sum wage if nationality==3 & sex==0|sex==1
sum wage if nationality==1|nationality==2|nationality==3 & sex==0
sum wage if nationality==1|nationality==2|nationality==3 & sex==1
sum wage if nationality==2 & sex==0|sex==1
sum wage if nationality==3 & sex==0|sex==1
sum wage if nationality==1|nationality==2|nationality==3 & sex==0
sum wage if nationality==1|nationality==2|nationality==3 & sex==1

best regards,
Sam Peters
Comment