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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.