|
LOG ODDS RATIO STANDARD ERRORName:
= (N11N22)/ (N12N21) where
N21 = number of failures in sample 1 N12 = number of successes in sample 2 N22 = number of failures in sample 2 The first definition shows the meaning of the odds ratio clearly, although it is more commonly given in the literature with the second definition. The log odds ratio is the logarithm of the odds ratio:
= LOG{(N11N22)/ (N12N21)} Success and failure can denote any binary response. Dataplot expects "success" to be coded as "1" and "failure" to be coded as "0". Dataplot actually returns the bias corrected version of the statistic:
In addition to reducing bias, this statistic also has the advantage that the odds ratio is still defined even when N12 or N21 is zero (the uncorrected statistic will be undefined for these cases). The standard error of this bias corrected log odds ratio is then \[ \hat{SE}(l'(o)) = \sqrt{\frac{1}{n_{11} + 0.5} + \frac{1}{n_{21}+ 0.5} + \frac{1}{n_{12}+0.5} + \frac{1}{n_{22}+0.5}} \]
<SUBSET/EXCEPT/FOR qualification> where <y1> is the first response variable; <y2> is the second response variable; <par> is a parameter where the computed log odds ratio standard error is stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional.
LET A = LOG ODDS RATIO STANDARD ERROR Y1 Y2 SUBSET TAG > 2
CROSS TABULATE LOG ODDS RATIO STANDARD ERROR ... Y1 Y2 X1 X2 LOG ODDS RATIO STANDARD ERROR PLOT Y1 Y2 X CROSS TABULATE LOG ODDS RATIO STANDARD ERROR PLOT ... Y1 Y2 X1 X2 BOOTSTRAP LOG ODDS RATIO STANDARD ERROR PLOT Y1 Y2 JACKNIFE LOG ODDS RATIO STANDARD ERROR PLOT Y1 Y2 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:
STANDARD ERROR LOG ODDS RATIO STANDARD ERROR LOGIT
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 = log odds ratio standard error y1 y2 subset x = 1 tabulate log odds ratio standard error 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 Bias Corrected Log Odds Ratio Standard Error x1label Group ID character x blank line blank solid . log odds ratio standard error plot y1 y2 x
|
Privacy
Policy/Security Notice
NIST is an agency of the U.S.
Commerce Department.
Date created: 06/06/2007 |