Looks like you might want:
proc sql;
create table counts as
select
id,
shortIPI,
sum(case when PTB="yes" then count else . end) as PTB_yes,
sum(count) as PTB_all
from meta
group by id, shortIPI;
quit;
proc glimmix data=counts;
class id shortIPI;
model PTB_yes/PTB_all = shortIPI / solution;
random intercept / subject=id;
run;
or maybe exchange the roles of PTB and shortIPI.
... View more