
RELATIVE RISKName:
The parameters N_{11}, N_{12}, N_{21}, and N_{22} denote the counts for each category. Success and failure can denote any binary response. Dataplot expects "success" to be coded as "1" and "failure" to be coded as "0". Some typical examples would be:
In these examples, the "ground truth" is typically given as variable 1 while some estimator of the ground truth is given as variable 2. The relative risk is defined as the ratio of the probability of "success" probabilities, that is
The relative risk is a useful statistic when comparing the difference in two binomial proportions when the probabilities of success are close to zero. For example, page 21 of Agresti gives the example where the absolute difference of proportions between 0.410, 0.401 and 0.010, 0.001 are both 0.09. However the relative risks are 0.410/0.401 = 1.02 and 0.010/0.001 = 10.
<SUBSET/EXCEPT/FOR qualification> where <y1> is the first response variable; <y2> is the second response variable; <par> is a parameter where the computed relative risk is stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional.
LET A = RELATIVE RISK Y1 Y2 SUBSET TAG > 2
Note that the above commands expect the variables to have the same number of observations. If the two samples are in fact of different sizes, there are two ways to address the issue:
Agresti (2007), "Introduction to Categorical Data Analysis", Second Edition, Wiley.
let n = 1 . let p = 0.2 let y1 = binomial rand numb for i = 1 1 100 let p = 0.1 let y2 = binomial rand numb for i = 1 1 100 . let p = 0.4 let y1 = binomial rand numb for i = 101 1 200 let p = 0.08 let y2 = binomial rand numb for i = 101 1 200 . let p = 0.15 let y1 = binomial rand numb for i = 201 1 300 let p = 0.18 let y2 = binomial rand numb for i = 201 1 300 . let p = 0.6 let y1 = binomial rand numb for i = 301 1 400 let p = 0.45 let y2 = binomial rand numb for i = 301 1 400 . let p = 0.3 let y1 = binomial rand numb for i = 401 1 500 let p = 0.1 let y2 = binomial rand numb for i = 401 1 500 . let x = sequence 1 100 1 5 . let a = relative risk y1 y2 subset x = 1 tabulate relative risk y1 y2 x . label case asis xlimits 1 5 major xtic mark number 5 minor xtic mark number 0 xtic mark offset 0.5 0.5 y1label Relative Risk x1label Group ID character x blank line blank solid . relative risk plot y1 y2 x
 
Privacy
Policy/Security Notice
NIST is an agency of the U.S. Commerce Department.
Date created: 07/24/2007 