What does the code Count (distinct usubjid || aedecod). why concatenation operator (II) given in between usubjid and aedecod? what does concatenation operator mean and when do we write in that way.
see part of the code below:
*******
proc sql;
create table table1 as select distinct COHORTN, count (distinct USUBJID || AEDECOD) as num, 2 as cat from adae;
group by COHORTN;
quit;
*******
Thank you!
Why? Ask the person that wrote the code.
Must have wanted to count the number of combinations of those two variables.
If you don't know what "concatenation" means it basically means stick things together.
Example:
data example; thisvar = "Some text"; thatvar = "yet more text"; combined = thisvar||thatvar; put combined=; run;
When? When it does what you want.
probably i got the answer:
"count (distinct USUBJID || AEDECOD)" this counts the distinct number of records for both USUBJID and AEDECOD. If any USUBID has two same AEDECOD (i.e if any subject has two records for Hypotension) it counts One.
Thanks!
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.