An Illustration of Rate Difference Estimation with SAS in Logistic Regression Yun Guo
Jan 05, 2016
An Illustration of Rate Difference Estimation with SAS
in Logistic Regression
Yun Guo
Outline
• Statistical methods for RD
• RD with logistic regression
• SAS realization
• Conclusion
Statistical methods
• Wald/t approximation—no covariate adjust• CMH (weighted estimate)-adjust strata• Logistic Regression-adjust both
Statistical methods
• Logistic regression
,where, x is covariate, s is factor, t is treatment, sub i is indexing subject
(1)
exp( )
1 exp( )i i i
ii i i
x s tp
x s t
(2)
RD with logistic regression
• Odd Ratio through Logistic Regression
Simply subtract among different levels of factor
Say t(t=1) vs. t(t=0),
1 0log( ) log( ) log( ) exp( )1 1t t
p pOR
p p
RD with logistic regression
• Rate through Logistic Regression (say subject i=1)
1
0
1 0
exp( )
1 exp( )
exp( )
1 exp( )
i it
i i
i it
i i
t t
x sp
x s
x sp
x s
RD p p
(3)
Intercept, covariate as well as factor, not gone!!!!
RD with logistic regression
• How about the variance of estimate?
1
0
1 0
exp( )
1 exp( )
exp( )
1 exp( )
var( ) var( )
i it
i i
i it
i i
t t
x sp
x s
x sp
x s
RD p p
(4)
Very messy!!!
RD with logistic regression
Hereafter subscript 1/0 of est p index treatment.
Statistical methods
• Marginal approach (sum over all samples)
Statistical methods
Statistical methods
• To conclude, we have following 4 steps• 1, establish logistic regression • 2, get estimated rates, covariance of estimates,
estimated RD• 3, set up Delta method• 4, get CI
SAS realizationEXAMPLE DATA
SAS realizationPREPARE DATA
SAS realizationSTEP 1: Logistic regression
SAS realizationSTEP 1: Logistic regression
SAS realizationSTEP 1: Logistic regression
COV
EST
SAS realizationSTEP 2: RD estimate
SAS realization
Step 3: Delta method
Step 4: CI
Conclusion
1, When covariates adjust needed, a choice is to use L Regression
2, Other methods could be used too
Thank you!