Currently I have the table below by using collect, table and appending them together:
However, I would like to add mean of annual hours work as a new column after collecting them:
How can I use collect to add the column of mean annual hours work to the existing table?
Thank you for your answers in advance!
Code:
collect: table (educ_4concat) (labforce sex), statistic(percent, across(labforce)) nototals style(table-1) collect: table (age_4concat) (labforce sex), statistic(percent, across(labforce)) nototals append collect: table (race_3concat) (labforce sex), statistic(percent, across(labforce)) nototals append collect layout (educ_4concat age_4concat race_3concat) (labforce[2]#sex)
Code:
gen annualwork = uhrsworkt * 52 bysort educ_4concat: summarize annualwork collect: bysort educ_4concat: summarize annualwork bysort age_4concat: summarize annualwork collect: bysort age_4concat: summarize annualwork bysort race_3concat: summarize annualwork collect: bysort race_3concat: summarize annualwork
Thank you for your answers in advance!
Comment