Tags:
create new tag
, view all tags, tagging instructions
Return to Stat Graph Home

Title: P-risk (Risk Difference) Plot of Treatment Emergent Adverse Events at PT Level

ClinAEStatGraphicsForm edit

Image

Click on image to enlarge.

Top SAS/GRAPH image

Bottom SAS 9.4 SGPLOT image.


Title P-risk (Risk Difference) Plot of Treatment Emergent Adverse Events at PT Level
Graph_Subgroup Adverse Events
AE_Clinical_Question 1. Which AEs are elevated in treatment vs. control?, 2. Which AE could be a safety signal?
Description Risk difference (RD) of AE occurrence (%) between drug and control by preferred term.
The graph is a tool used for safety signal screening and AE data display. It allows investigators to evaluate AE risks using both estimates of risk difference and p-values. Optional reference lines are added so that AEs with large RD and small p-values can be identified in the upper right corner of the plot.

NOTE: This graph can be modified based on the choice of hierarchy level (high level term or system organ class) and risk measure (odds ratio, risk ratio).
Contributor/Email Qi Jiang (email: Qjiang@amgen.com)
SAS code contributed by Haijun Ma and Jun Wei
Background

Keywords volcano plot, p-value, risk difference
References

Datasets Other
CDISC_Data

Other_Data in SAS code
CLASSIFICATIONS

Graph_Type Volcano Plots
Variable_Relationship Summary
Data_Types Continuous
Special_Considerations

Code_Available Yes
Software Program SAS
Software

R-Code - Attachment

R-Code

SAS-Code - Attachment SAS code for Volcano Plot 1/2013
SAS-Code /*--SAS 9.40M3 SGPLOT Procedure--*/
%let gpath='.';
%let dpi=200;
ods html close;
ods listing gpath=&gpath image_dpi=&dpi;

/*--Sample data (reduced columns)--*/
data sample;
input AESOC $ 1-53 AEPT $ 54-98 RR P_RR;
datalines;
BLOOD AND LYMPHATIC SYSTEM DISORDERS Agranulocytosis 0.33 0.3148786413
BLOOD AND LYMPHATIC SYSTEM DISORDERS Anaemia 1.3436 0.2280680306
BLOOD AND LYMPHATIC SYSTEM DISORDERS Eosinophilia 1.584 0.4145931863
BLOOD AND LYMPHATIC SYSTEM DISORDERS Erythropenia 2.97 0.3197423745
BLOOD AND LYMPHATIC SYSTEM DISORDERS Iron Deficiency Anaemia 0.495 0.2401452656
BLOOD AND LYMPHATIC SYSTEM DISORDERS Leukocytosis 8.9101 0.0464665798
BLOOD AND LYMPHATIC SYSTEM DISORDERS Leukopenia 1.782 0.2923841772
BLOOD AND LYMPHATIC SYSTEM DISORDERS Neutropenia 0.495 0.4067545386
BLOOD AND LYMPHATIC SYSTEM DISORDERS Pancytopenia 2.97 0.3219117272
BLOOD AND LYMPHATIC SYSTEM DISORDERS Thrombocythaemia 0.33 0.3121842641
CARDIAC DISORDERS Acute Myocardial Infarction 1.98 0.4208333427
CARDIAC DISORDERS Arrhythmia 1.4143 0.3143466968
CARDIAC DISORDERS Arteriosclerosis Coronary Artery 0.495 0.5576818581
CARDIAC DISORDERS Atrial Fibrillation 0.9039 0.7356136775
CARDIAC DISORDERS Atrial Flutter 0.1414 0.0816047121
CARDIAC DISORDERS Bundle Branch Block Right 0.8901 0.025975207
CARDIAC DISORDERS Cardiac Failure 0.9281 0.8346033439
CARDIAC DISORDERS Cardiac Failure Congestive 1.485 0.5368072613
CARDIAC DISORDERS Cardiogenic Shock 0.198 0.1551386279
CARDIAC DISORDERS Coronary Artery Disease 1.584 0.2473978765
CARDIAC DISORDERS Extrasystoles 0.5775 0.2407608216
CARDIAC DISORDERS Mitral Valve Incompetence 0.792 0.7271243808
CARDIAC DISORDERS Myocardial Infarction 0.54 0.215995664
CARDIAC DISORDERS Myocardial Ischaemia 1.2375 0.6515736336
CARDIAC DISORDERS Sinus Bradycardia 0.2475 0.1757549055
CARDIAC DISORDERS Supraventricular Extrasystoles 0.396 0.2507472288
CARDIAC DISORDERS Tachycardia 1.2729 0.6303008251
EAR AND LABYRINTH DISORDERS Deafness Unilateral 4.95 0.159309738
EAR AND LABYRINTH DISORDERS Ear Pain 0.6188 0.3941259365
EAR AND LABYRINTH DISORDERS Hypoacusis 0.55 0.275446407
EAR AND LABYRINTH DISORDERS Tinnitus 1.155 0.7125759319
ENDOCRINE DISORDERS Goitre 0.88 0.7917211399
ENDOCRINE DISORDERS Hyperthyroidism 0.5657 0.3560080097
ENDOCRINE DISORDERS Hypothyroidism 1.1647 0.6412939681
ENDOCRINE DISORDERS Thyroiditis 6.9301 0.084701416
EYE DISORDERS Conjunctivitis 1.3394 0.3555350147
EYE DISORDERS Conjunctivitis Allergic 2.31 0.210855982
EYE DISORDERS Eye Haemorrhage 4.95 0.1047447545
EYE DISORDERS Eye Pain 1.98 0.3239054265
EYE DISORDERS Glaucoma 0.675 0.2341704745
EYE DISORDERS Keratoconjunctivitis Sicca 3.96 0.1830405926
EYE DISORDERS Visual Acuity Reduced 0.44 0.1590844192
GASTROINTESTINAL DISORDERS Abdominal Pain Upper 0.9664 0.8743987392
GASTROINTESTINAL DISORDERS Colitis 1.98 0.2543971528
GASTROINTESTINAL DISORDERS Diverticulum 0.77 0.6019334766
GASTROINTESTINAL DISORDERS Dry Mouth 0.693 0.4528565301
GASTROINTESTINAL DISORDERS Flatulence 0.693 0.1905783219
GASTROINTESTINAL DISORDERS Gastric Polyps 0.66 0.6463699768
GASTROINTESTINAL DISORDERS Gastric Ulcer 0.66 0.5160244598
GASTROINTESTINAL DISORDERS Gastrooesophageal Reflux Disease 0.825 0.5210541755
GASTROINTESTINAL DISORDERS Haematochezia 0.198 0.0995753444
GASTROINTESTINAL DISORDERS Haemorrhoids 0.7748 0.4125481894
GASTROINTESTINAL DISORDERS Hiatus Hernia 1.3436 0.3971137024
GASTROINTESTINAL DISORDERS Hyperchlorhydria 0.11 0.0442998399
GASTROINTESTINAL DISORDERS Irritable Bowel Syndrome 0.825 0.6514020473
GASTROINTESTINAL DISORDERS Oesophagitis 1.98 0.1622595266
GASTROINTESTINAL DISORDERS Periodontitis 0.2829 0.0921100566
GASTROINTESTINAL DISORDERS Stomach Discomfort 0.594 0.4701055328
GASTROINTESTINAL DISORDERS Toothache 0.198 0.0197110756
GASTROINTESTINAL DISORDERS Vomiting 0.9609 0.8686066329
GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS Asthenia 0.6233 0.1202125134
GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS Influenza Like Illness 0.594 0.3062677146
GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS Local Swelling 2.475 0.2618987455
GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS Malaise 1.3613 0.5036977992
GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS Oedema Peripheral 0.9526 0.8006977584
GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS Pain 1.32 0.4634454407
GENERAL DISORDERS AND ADMINISTRATION SITE CONDITIONS Pyrexia 1.122 0.7435940934
HEPATOBILIARY DISORDERS Cholelithiasis 1.265 0.4505128911
HEPATOBILIARY DISORDERS Hepatic Steatosis 1.32 0.6051366816
IMMUNE SYSTEM DISORDERS Drug Hypersensitivity 1.65 0.4877812755
INFECTIONS AND INFESTATIONS Diverticulitis 0.7425 0.4962979657
INFECTIONS AND INFESTATIONS Ear Infection 1.815 0.231821959
INFECTIONS AND INFESTATIONS Fungal Skin Infection 0.09 0.0245078539
INFECTIONS AND INFESTATIONS Gastroenteritis 0.8972 0.6683875626
INFECTIONS AND INFESTATIONS Gastroenteritis Viral 0.7615 0.5141223575
INFECTIONS AND INFESTATIONS Herpes Zoster 0.7169 0.2387433031
INFECTIONS AND INFESTATIONS Laryngitis 0.63 0.3333811942
INFECTIONS AND INFESTATIONS Localised Infection 0.8486 0.7671078012
INFECTIONS AND INFESTATIONS Lower Respiratory Tract Infection 0.6828 0.1824205212
INFECTIONS AND INFESTATIONS Onychomycosis 0.72 0.4760656342
INFECTIONS AND INFESTATIONS Otitis Media 0.33 0.1526073972
INFECTIONS AND INFESTATIONS Pyelonephritis 0.1414 0.0324796911
INFECTIONS AND INFESTATIONS Respiratory Tract Infection 1.4231 0.2723690156
INFECTIONS AND INFESTATIONS Respiratory Tract Infection Viral 0.7425 0.5790808219
INFECTIONS AND INFESTATIONS Rhinitis 1.125 0.6841668407
INFECTIONS AND INFESTATIONS Sinusitis 0.9379 0.7797056546
INFECTIONS AND INFESTATIONS Tracheitis 3.96 0.0594592557 1
INJURY, POISONING AND PROCEDURAL COMPLICATIONS Back Injury 0.66 0.4259000244
INJURY, POISONING AND PROCEDURAL COMPLICATIONS Excoriation 1.5557 0.3552027384
INJURY, POISONING AND PROCEDURAL COMPLICATIONS Femur Fracture 0.792 0.6210532684
INJURY, POISONING AND PROCEDURAL COMPLICATIONS Foot Fracture 0.726 0.4156206662
INJURY, POISONING AND PROCEDURAL COMPLICATIONS Humerus Fracture 0.825 0.5792032912
INJURY, POISONING AND PROCEDURAL COMPLICATIONS Joint Injury 0.5657 0.1908350303
INJURY, POISONING AND PROCEDURAL COMPLICATIONS Joint Sprain 1.54 0.146208831
INJURY, POISONING AND PROCEDURAL COMPLICATIONS Lumbar Vertebral Fracture 0.4714 0.0438641557
INJURY, POISONING AND PROCEDURAL COMPLICATIONS Muscle Strain 2.2275 0.0517765512
INJURY, POISONING AND PROCEDURAL COMPLICATIONS Post-Traumatic Pain 1.4143 0.4782663204
INJURY, POISONING AND PROCEDURAL COMPLICATIONS Procedural Pain 0.63 0.1698073379
INJURY, POISONING AND PROCEDURAL COMPLICATIONS Skin Laceration 0.495 0.1888344299
INJURY, POISONING AND PROCEDURAL COMPLICATIONS Thoracic Vertebral Fracture 0.6406 0.2433700522
INJURY, POISONING AND PROCEDURAL COMPLICATIONS Wound 1.21 0.6698783855
INVESTIGATIONS Blood Cholesterol Increased 8.91 0.0117906386
INVESTIGATIONS Blood Pressure Increased 0.8486 0.674561908
INVESTIGATIONS Weight Decreased 0.9138 0.8210610531
METABOLISM AND NUTRITION DISORDERS Anorexia 2.2275 0.1701144856
METABOLISM AND NUTRITION DISORDERS Diabetes Mellitus 1.1385 0.6686225042
METABOLISM AND NUTRITION DISORDERS Glucose Tolerance Impaired 0.495 0.3093142609
METABOLISM AND NUTRITION DISORDERS Hyperlipidaemia 0.5241 0.109081222
METABOLISM AND NUTRITION DISORDERS Hypokalaemia 3.96 0.0208538568
METABOLISM AND NUTRITION DISORDERS Type 2 Diabetes Mellitus 0.81 0.637335401
MUSCULOSKELETAL AND CONNECTIVE TISSUE DISORDERS Arthralgia 1.0055 0.944342722
MUSCULOSKELETAL AND CONNECTIVE TISSUE DISORDERS Arthritis 0.6188 0.2269744035
MUSCULOSKELETAL AND CONNECTIVE TISSUE DISORDERS Bursitis 1.6088 0.2836170752
MUSCULOSKELETAL AND CONNECTIVE TISSUE DISORDERS Foot Deformity 1.485 0.4489322069
MUSCULOSKELETAL AND CONNECTIVE TISSUE DISORDERS Joint Range Of Motion Decreased 0.0521 0.0025295164
MUSCULOSKELETAL AND CONNECTIVE TISSUE DISORDERS Joint Swelling 0.5331 0.0519091515
MUSCULOSKELETAL AND CONNECTIVE TISSUE DISORDERS Muscle Spasms 1.026 0.8895964188
MUSCULOSKELETAL AND CONNECTIVE TISSUE DISORDERS Muscular Weakness 2.64 0.1352278667
MUSCULOSKELETAL AND CONNECTIVE TISSUE DISORDERS Musculoskeletal Chest Pain 1.08 0.792470126
MUSCULOSKELETAL AND CONNECTIVE TISSUE DISORDERS Myalgia 0.9617 0.86949156
MUSCULOSKELETAL AND CONNECTIVE TISSUE DISORDERS Neck Pain 1.375 0.1368218963
MUSCULOSKELETAL AND CONNECTIVE TISSUE DISORDERS Osteochondrosis 0.7071 0.5511522841
MUSCULOSKELETAL AND CONNECTIVE TISSUE DISORDERS Spinal Osteoarthritis 0.7425 0.2633009587
NEOPLASMS BENIGN, MALIGNANT AND UNSPECIFIED Basal Cell Carcinoma 1.65 0.2280045653
NEOPLASMS BENIGN, MALIGNANT AND UNSPECIFIED Benign Neoplasm Of Thyroid Gland 2.97 0.1609401123
NEOPLASMS BENIGN, MALIGNANT AND UNSPECIFIED Lung Neoplasm Malignant 7.92 0.0202393187
NEOPLASMS BENIGN, MALIGNANT AND UNSPECIFIED Uterine Leiomyoma 1.386 0.5746990151
NERVOUS SYSTEM DISORDERS Carpal Tunnel Syndrome 1.17 0.6999761615
NERVOUS SYSTEM DISORDERS Cerebrovascular Accident 1.485 0.3814726058
NERVOUS SYSTEM DISORDERS Memory Impairment 0.8858 0.7143846752
NERVOUS SYSTEM DISORDERS Paraesthesia 1.2229 0.5336887039
NERVOUS SYSTEM DISORDERS Radiculopathy 1.7325 0.3736804453
NERVOUS SYSTEM DISORDERS Syncope 0.7838 0.4225563004
PSYCHIATRIC DISORDERS Anxiety 1.485 0.0982279028
PSYCHIATRIC DISORDERS Insomnia 0.946 0.7911351204
PSYCHIATRIC DISORDERS Sleep Disorder 3.2175 0.030094171
RENAL AND URINARY DISORDERS Dysuria 0.3494 0.0199275109
RENAL AND URINARY DISORDERS Pollakiuria 0.495 0.1497843968
RENAL AND URINARY DISORDERS Renal Failure Chronic 14.8501 0.0084001402
REPRODUCTIVE SYSTEM AND BREAST DISORDERS Breast Pain 0.2475 0.055286265
REPRODUCTIVE SYSTEM AND BREAST DISORDERS Fibrocystic Breast Disease 3.465 0.0980924111
RESPIRATORY, THORACIC AND MEDIASTINAL DISORDERS Asthma 1.1984 0.5556299808
RESPIRATORY, THORACIC AND MEDIASTINAL DISORDERS Chronic Obstructive Pulmonary Disease 0.8663 0.7806905098
RESPIRATORY, THORACIC AND MEDIASTINAL DISORDERS Dysphonia 1.98 0.2023077388
RESPIRATORY, THORACIC AND MEDIASTINAL DISORDERS Epistaxis 2.5457 0.0288840825
RESPIRATORY, THORACIC AND MEDIASTINAL DISORDERS Pharyngolaryngeal Pain 0.6011 0.0914236418
SKIN AND SUBCUTANEOUS TISSUE DISORDERS Alopecia 0.7816 0.4715786881
SKIN AND SUBCUTANEOUS TISSUE DISORDERS Ecchymosis 5.94 0.0602811515
SKIN AND SUBCUTANEOUS TISSUE DISORDERS Pruritus 0.7034 0.1548440156
SKIN AND SUBCUTANEOUS TISSUE DISORDERS Rash 1.4204 0.1892661599
SKIN AND SUBCUTANEOUS TISSUE DISORDERS Skin Ulcer 1.98 0.130949523
SKIN AND SUBCUTANEOUS TISSUE DISORDERS Urticaria 0.66 0.3574165938
VASCULAR DISORDERS Hypertension 1.0093 0.9180264231
VASCULAR DISORDERS Hypertensive Crisis 0.7425 0.6952655981
;
run;

/*ods html;*/
/*proc print;run;*/
/*ods html close;*/

/*--Define Format with Unicode for the left and right arrows--*/
proc format;;
value $txt
"P" = "Favors Placebo (ESC){Unicode '2192'x}"
"T" = "(ESC){Unicode '2190'x} Favors Treatment";
run;

/*--Add axis annotation text to data--*/
data sample2;
set sample end=last;
if p_rr < 0.05 and rr > 1 then label=aept;
output;
if last then do;
ylbl=1.0; xlbl=0.3; text="T"; output;
ylbl=1.0; xlbl=3; text="P"; output;
end;
run;

/*--Create Volcano Plot--*/
ods graphics / reset width=6in height=4in maxlegendarea=100 imagename='Volcano_RR';
title 'P-risk (Odds Ratio) Plot of Treatment Emergent Adverse Events at PT Level';
proc sgplot data=sample2;
format aesoc $10. text $txt.;
label p_rr='Fisher Exact p-value';
label rr='Odds Ratio';
scatter x=rr y=p_rr / group=aesoc datalabel=label name='a';
refline 1 / axis=x lineattrs=(pattern=shortdash);
refline 0.05 / axis=y lineattrs=(pattern=shortdash);
inset ("Placebo:" = "n/N(%)=527/1287 (40.9%)"
"Treatment:" = "n/N(%)=513/1300 (39.5%)") / noborder position=topleft;
text x=xlbl y=ylbl text=text / position=bottom contributeoffsets=(ymax);
yaxis reverse type=log values=(1.0 0.1 0.05 0.01 0.001) offsetmin=0.1;
xaxis type=log values=(0.1 1 2 5 10) valueshint;
keylegend 'a' / across=1 position=right valueattrs=(size=6);
run;
Stata-Code - Attachment

Stata-Code

Other Code - Attachment

Other Code

Disclaimer The views expressed within CTSpedia are those of the author and must not be taken to represent policy or guidance on the behalf of any organization or institution with which the author is affiliated.
Permission Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT OLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Reference Image Jiang_AE_Risk_200.png
Topic attachments
I Attachment Action Size Date Who Comment
pngpng Volcano_RR.png manage 111.0 K 25 May 2016 - 13:43 SanjayMatange Volcano Plot using SAS 9.40M3 SGPLOT Procedure
pngpng Volcano_RR_200.png manage 17.8 K 25 May 2016 - 13:44 SanjayMatange Icon for Volcano Plot using SAS 9.40M3 SGPLOT Procedure
Topic revision: r7 - 25 May 2016 - 13:54:51 - SanjayMatange
 

Copyright & by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding CTSPedia? Send feedback