Hi:
This is a new question and on the 3rd page of a previous posting. This really should be a new question by itself.
As with other suggestions, we need to see sample data in a form that is usable and also need to see the code that you've tried.
You are describing 2 different challenges:
1) how to categorize ages into aggregate categories and get N and % based on the categories
2) how to get summary statistics by treatment (TRT1, TRT2) into the N (%) form you need.
And, my recommendation is that first you generate the numbers you need for the N and the Percent and then you worry about getting the cosmetics straight.
To make the categories you want, assuming that you have rows with individual age values in your data (and no one knows what your data looks like because you haven't posted any data) -- assuming you need to make categories based on an AGE variable, I would recommend a user-defined format.
Cynthia
This addresses the 1st challenge:
Previous postings have shown that you need to make a dataset from your correct results and then make a character variable that contains your N (%) and use that new data to create your report.
Hi:
This question about 2 treatments has already been asked and answered in this same forum, with an example, as shown below:
Once you get THESE numbers in separate cells, either using PROC REPORT, PROC TABULATE or PROC FREQ, then getting the total is very easy. All you have to do is change the above COLUMN statement:
To make a character variable that has the N and percent N cosmetically arranged as you describe -- that will need a COMPUTE block. Once you have the cosmetics settled, you can then use NOPRINT on the DEFINE statements for N and PCTN.
Also making a character column is just a matter of using a COMPUTE block. However, because SUB-01 and SUB-02 are across items, you have to make your character column on the report using absolute column names. There have been many previous forum postings on using ACROSS items in a COMPUTE block and using absolute column numbers.
Cynthia
Hello Cynthia!
I'm trying to do SDTM EG domain so that I've a raw data that should be converted to standard SDTM EG format.The format should be the SDTMIG ,we have example in that domain.
Hi:
This is NOT at all related to your previous postings or your original question. Please start a new posting for this question. Your screen shot is unreadable.
In your new posting, you'll need to post a better screen shot of your desired output. If you post your input data as a screen shot, no one will be able to help you. As always, we need to see the code you've tried and the data you're using and a good description of the problem and what you need to generate as desired output.
To work with CDISC data, we have the Clinical Standards Toolkit and the XML Mapper. If you are not familiar with those tools, it might be better for you to open a track with Tech Support.
Cynthia
Ohh Ok. Thank you quick response
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.