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!
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.