如何在给定另一个变量的情况下为一个变量创建 proc freq table

How to make a proc freq table for one variable given another variable

我需要为变量 "type" 设置 proc freq levels table,但仅针对 "place_of_origin" 变量下的“USA”条目。

现在我在做

proc freq data=CarsVROOM nlevels;
tables type;
run;

它显示了所有 "Type" 的频率 table,但我只想看到所有 "Type" 的频率 table '美国的对象。 我应该向 tables 语句添加哪些选项? 谢谢:)

你是说要有 where 语句吗?

proc freq data=CarsVROOM nlevels;
  where type = 'USA';
  tables type;
run;