- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Dear Community,
I am quite new to SAS programming and has been learning and using SAS to clean and manipulate data for about 2 months (thanks to the great and generous help I got from this forum) and now I want to challenge myself to learn tabulating summary reports (Example 1, 3 and 4 in the attached paper). Below is a simple example I found on internet:
0verall N=70 | ||
| ------ | ------------ |
System Organ Class |
| Subject |
Preferred Term | Event | n(%) |
--------------------------------------------------------- | ||
Overall | 20 | 14(20) |
Cardiac disorders | 6 | 4 (6) |
Atrial flutter | 1 | 1 (1) |
Cardiac failure | 1 | 1 (1) |
Palpitations | 3 | 2 (3) |
Tachycardia | 1 | 1 (1) |
This example above was written in SAS Macro, which seems very complicated to me for now and I plan to learn later when I have had more experience. For now, I just want to try to use SAS code to generate the summary above. The Marco codes in the attached abstract is too hard to follow now.
For those not familiar with clinical trial data, I have a data set consisting variables like subject id, aeterm, preferred term and system organ class (SOC) of thousand observation, which I would like to turn the data into the summary table like above. Below is the part of the data
usubjid | aeterm | preferred term | aebodsys |
1002 | aspiration pneumonitis | Pneumonia aspiration | Respiratory, thoracic and mediastinal disorders |
1002 | Epistaxis | Epistaxis | Respiratory, thoracic and mediastinal disorders |
1003 | ischemic stroke | Ischaemic stroke | Nervous system disorders |
1007 | Multiple Myeloma | Plasma cell myeloma | Neoplasms benign, malignant and unspecified (incl cysts and polyps) |
1007 | Dehydration | Dehydration | Metabolism and nutrition disorders |
1007 | Worsening Pleural Effusions | Pleural effusion | Respiratory, thoracic and mediastinal disorders |
1011 | Orolingual angioedema | Angioedema | Skin and subcutaneous tissue disorders |
1011 | Worsening of Congestive heart failure | Cardiac failure congestive | Cardiac disorders |
1011 | Pneumonia | Pneumonia | Infections and infestations |
1012 | Recurrent Stroke | Cerebrovascular accident | Nervous system disorders |
1013 | Right femoral pesudoaneurysm | Vascular pseudoaneurysm | Injury, poisoning and procedural complications |
1016 | Malignant MCA infarction (Index Stroke) | Ischaemic stroke | Nervous system disorders |
1018 | Progression of Stroke | Stroke in evolution | Nervous system disorders |
1021 | Acute Coronary Syndrome | Acute coronary syndrome | Cardiac disorders |
1026 | Progression of Ischemic Stroke | Stroke in evolution | Nervous system disorders |
Any help would be greatly appreciated!
Thanks
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply.
I am working in a smal biotech company, there are no previous SAS code examples to follow. The clinical trial we are currently running is a blinded study and so I will have to change/update the Marco code in order to fit our situation.
Thank you very much again!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you !!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@zimcom wrote:
Dear Community,
I am quite new to SAS programming and has been learning and using SAS to clean and manipulate data for about 2 months (thanks to the great and generous help I got from this forum) and now I want to challenge myself to learn tabulating summary reports (Example 1, 3 and 4 in the attached paper). Below is a simple example I found on internet:
0verall N=70
------
------------
System Organ Class
Subject
Preferred Term
Event
n(%)
---------------------------------------------------------
Overall
20
14(20)
Cardiac disorders
6
4 (6)
Atrial flutter
1
1 (1)
Cardiac failure
1
1 (1)
Palpitations
3
2 (3)
Tachycardia
1
1 (1)
This example above was written in SAS Macro, which seems very complicated to me for now and I plan to learn later when I have had more experience. For now, I just want to try to use SAS code to generate the summary above. The Marco codes in the attached abstract is too hard to follow now.
For those not familiar with clinical trial data, I have a data set consisting variables like subject id, aeterm, preferred term and system organ class (SOC) of thousand observation, which I would like to turn the data into the summary table like above. Below is the part of the data
usubjid
aeterm
preferred term
aebodsys
1002
aspiration pneumonitis
Pneumonia aspiration
Respiratory, thoracic and mediastinal disorders
1002
Epistaxis
Epistaxis
Respiratory, thoracic and mediastinal disorders
1003
ischemic stroke
Ischaemic stroke
Nervous system disorders
1007
Multiple Myeloma
Plasma cell myeloma
Neoplasms benign, malignant and unspecified (incl cysts and polyps)
1007
Dehydration
Dehydration
Metabolism and nutrition disorders
1007
Worsening Pleural Effusions
Pleural effusion
Respiratory, thoracic and mediastinal disorders
1011
Orolingual angioedema
Angioedema
Skin and subcutaneous tissue disorders
1011
Worsening of Congestive heart failure
Cardiac failure congestive
Cardiac disorders
1011
Pneumonia
Pneumonia
Infections and infestations
1012
Recurrent Stroke
Cerebrovascular accident
Nervous system disorders
1013
Right femoral pesudoaneurysm
Vascular pseudoaneurysm
Injury, poisoning and procedural complications
1016
Malignant MCA infarction (Index Stroke)
Ischaemic stroke
Nervous system disorders
1018
Progression of Stroke
Stroke in evolution
Nervous system disorders
1021
Acute Coronary Syndrome
Acute coronary syndrome
Cardiac disorders
1026
Progression of Ischemic Stroke
Stroke in evolution
Nervous system disorders
Any help would be greatly appreciated!
Thanks
L
Search for the paper, creating complex reports via Cynthia Zender, @Cynthia_sas
You can also look at PROC REPORT.
To be honest, you can get pretty close using just PROC FREQ.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Totally agree! Individually the summary data can all be calculated using Proc Freq, but the challenge is how to put everything nicely in a user-friendly format
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello @zimcom,
Adverse event (AE) summary tables like this are very common in clinical research. That's why many pharmaceutical companies and CROs use macros to create them. So, in practice you would typically have such a macro available and use it without having to know the underlying macro code.
To verify some (or all) of the frequencies and percentages in the table, you can use PROC FREQ and (especially for the subject counts) PROC SQL. For code samples see, e.g., this PharmaSUG paper (p. 5-6), which covers this and other types of AE tables.
Depending on the desired table layout, the PROC REPORT code can be more or less complicated. For example, you may want to indent the preferred terms ("Atrial flutter" etc.) under their SOC name ("Cardiac disorders"), which can be achieved in different ways as is described in this WUSS paper.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your reply.
I am working in a smal biotech company, there are no previous SAS code examples to follow. The clinical trial we are currently running is a blinded study and so I will have to change/update the Marco code in order to fit our situation.
Thank you very much again!