Original Message:
Sent: Fri June 14, 2024 03:01 PM
From: Art Jack
Subject: Select and Filter by Cases Based on Frequency
i think something simple like this would work.
if appoint_type=1 flag=1.
recode flag(missing=0).
aggregate outfile =* /break id flag /count=n.
or
aggregate outfile =* /break id appoint_type /count=n.
------------------------------
Art Jack
------------------------------
Original Message:
Sent: Fri June 14, 2024 11:48 AM
From: Colter Clayton
Subject: Select and Filter by Cases Based on Frequency
This works perfectly, thank you! Also, how would I add to break with an additional variable? So, I have my 'ID' variable and I have an 'appoint_type' variable that has values from 1 to 5. If I want to break by 'ID' and 'appoint_type' when 'appoint_type' is equal to 1, how would I properly add that to the syntax? For example,
AGGREGATE OUTFILE=* mode=ADDVARIABLES /BREAK=id and appoint_type=1 /count=n.
Additional syntax added in italics
------------------------------
Colter
Original Message:
Sent: Fri June 14, 2024 09:00 AM
From: Art Jack
Subject: Select and Filter by Cases Based on Frequency
i'd use addvariables in the aggregate.
AGGREGATE OUTFILE=* mode=ADDVARIABLES /BREAK=id /count=n.
------------------------------
Art Jack