Appendix

 

Chapter 1

%MinRisk Macro: Minimum Risk Test for Stratified Binary Data

%macro MinRisk(dataset);/*Inputs:

DATASET = Input data set with event rates observed in each stratum. The input data set must include variables named EVENT1 (number of events of interest in Treatment group 1), EVENT2 (number of events of interest in Treatment group 2), NOEVENT1 (number of non-events in Treatment group 1), NOEVENT2 (number of non-events in Treatment group 2) with one record per stratum.

*/proc iml;      use &dataset;      read all var {event1 noevent1 event2 noevent2} into data;      m=nrow(data);      p=j(m,2,0); n=j(m,2,0);      n[,1]=data[,1]+data[,2];      n[,2]=data[,3]+data[,4];      total=sum(n);      p[,1]=data[,1]/n[,1];      p[,2]=data[,3]/n[,2]; ...

Get Analysis of Clinical Trials Using SAS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.