I am trying to subset data based on the frequency of a given value within a variable. I've attached a screen shot of a proc freq table, and essentially I would like to include all CCIDummy values where row percent UpdtxStatus 'yes' >/=5%.
I tried the following code, but the '%' results in a syntax error:
proc sql;
create table TEST as
select *
from work.CombiningProceduresDummyVariable
group by CCIdummy
having (UpdtxStatus='yes')ge 5%;
quit;
Thanks in advance!