从两个分类变量创建 % (Stata)

Creating a % from two categorical variables (Stata)

我有两个变量,一个是劳动力市场状况,它被列为每个类别的人数:

LF_status      Freq. 

In_LF           100
Out_of_LF       20

然后是具有以下组的教育分类变量:

educ                     Freq. 
no_HS                    30 
HS but not college       80
College                  10

我想将劳动力参与可视化为每个组中的百分比。例如,拥有大学学位的人中有多少百分比在劳动力中,而不是使用 frequencies/counts。本质上,我想知道劳动力参与率如何因受教育程度而异。

目前我的代码是这样的,它产生类似于下图的内容:

graph hbar (count), over(lm_stat) over(educ) 

社区为 graph hbar 提供的包装器来自 SSC catplot

sysuse auto, clear 
catplot rep78 foreign, percent(foreign) 

是一个简单的例子。