6.6 Adjusted odds ratios, relative risks and risk ratios
Odds ratios, relative risks and risk ratios can be adjusted to specific factors. Suppose we fit a logistic regression with the indicator variable of the target as the response and the exposure indicator and confounding variables as dependent variables,
\[\begin{align*} &\mbox{logit}(\Pr(I_{\mbox{Target}} = 1|I_{\mbox{exposure}} )) = \beta_0 + \beta I_{\mbox{exposure}} + \sum_{i} \beta_i \mbox{confounding}_i \\ &\mbox{Adjusted odds ratio}=\frac{\Pr(I_{\mbox{Target}} = 1|I_{\mbox{exposure}}=1) / \Pr(I_{\mbox{Target}} = 0|I_{\mbox{exposure}}=1)}{\Pr(I_{\mbox{Target}} = 1|I_{\mbox{exposure}}=0)/\Pr(I_{\mbox{Target}} = 0|I_{\mbox{exposure}}=0)} = e^\beta. %\exp(\beta). \end{align*}\]
As suggested by (Wacholder 1986), we fit a binomial regression with logarithmic, and identity link functions for the adjusted relative risks, and risk difference, respectively. In the binomial regression with logarithmic link function, we can obtain the adjusted relative risks as
\[\begin{align*} &\mbox{log}(\Pr(I_{\mbox{Target}} = 1|I_{\mbox{exposure}} )) = \beta_0 + \beta I_{\mbox{exposure}} + \sum_{i} \beta_i \mbox{confounding}_i \\ &\mbox{Adjusted relative risk}=\frac{\Pr(I_{\mbox{Target}} = 1|I_{\mbox{exposure}}=1)}{\Pr(I_{\mbox{Target}} = 1|I_{\mbox{exposure}}=0)} = e^\beta. \end{align*}\]
In the binomial regression with identity link function, we can obtain the adjusted risk differences as
\[\begin{align*} \Pr(I_{\mbox{Target}}&= 1|I_{\mbox{exposure}} ) = \beta_0 + \beta I_{\mbox{exposure}} + \sum_{i} \beta_i \mbox{confounding}_i \\ \mbox{Adjusted risk difference}&=\Pr(I_{\mbox{Target}} = 1|I_{\mbox{exposure}}=1 )- \Pr(I_{\mbox{Target}} = 1|I_{\mbox{exposure}}=0 )\\ & = \beta. \end{align*}\]
Suppose we want to study the relationship of experiencing dry mouth in the past 12 months (\(\texttt{ORH_EXP_DRM_MCQ}\)) with sex (\(\texttt{SEX_ASK_TRM}\)) adjusted by the province (\(\texttt{WGHTS_PROV_TRM}\)), age groups and the individual education, we can obtain the odds ratio, relative risk and risk ratio by the following codes:
R
## Adjusted odds ratio
Adj.OR<-svyglm(ORH_EXP_DRM_MCQ ~ SEX_ASK_TRM + Age_group_5 + Education +
WGHTS_PROV_TRM, family = quasibinomial(link = "logit"),
design = CLSA.design.anly)
exp(coef(Adj.OR)["SEX_ASK_TRMM"])
exp(confint(Adj.OR)["SEX_ASK_TRMM",])
## Adjusted risk ratio (initial value found by SAS program)
Adj.RR<-svyglm(ORH_EXP_DRM_MCQ ~ SEX_ASK_TRM + Age_group_5 + Education +
WGHTS_PROV_TRM, family = quasibinomial(link = "log"),
design = CLSA.design.anly,
start = c(-1.43, -.13, 0.05, 0.06, -.39, 0.05, -.49, -.38, -.34,
0.69, 0.55, -.27, -.54, 0.76,-.0006, 0.95, 0.55, 0.48) )
exp(coef(Adj.RR)["SEX_ASK_TRMM"])
exp(confint(Adj.RR)["SEX_ASK_TRMM",])
## Adjusted risk difference (initial value found by SAS program)
Adj.RD<-svyglm(ORH_EXP_DRM_MCQ ~ SEX_ASK_TRM + Age_group_5 + Education +
WGHTS_PROV_TRM, family =quasibinomial(link ="identity"),
design = CLSA.design.anly,
start = c( 0.14, -.02, 0.05, 0.094, 0.0085, 0.108, -.063, -.083, -.043,
0.172, 0.181, 0.026,-.033, 0.231, 0.050, 0.236, 0.125, 0.125))
coef(Adj.RD)["SEX_ASK_TRMM"] ; confint(Adj.RD)["SEX_ASK_TRMM",]
SAS
There is no formal procedure for the adjusted relative risk and risk ratios. We would compare the results from \(\texttt{PROC GENMOD}\) and the appropriate procedures from other statistic packages. \(\texttt{PROC GENMOD}\) is not a complex survey routine. Although it also contains \(\texttt{WEIGHT}\) and \(\texttt{STRATA}\) statements, they have different meaning compared to what they have in \(\texttt{PROC SURVEYLOGISTIC}\). The correct approach can be archived with the SUDAAN package which we would not discuss here. Interested readers may refer to (Bieler et al. 2010).
/*Adjusted odds ratio considering the survey design*/
PROC SURVEYLOGISTIC data = CLSAData;
CLASS ORH_EXP_DRM_MCQ WGHTS_PROV_TRM(ref = 'AB') Age_group_5(ref = '45-48')
SEX_ASK_TRM(ref ='F') Education(ref = 'Low Education') /param = ref;
MODEL ORH_EXP_DRM_MCQ(event = 'Yes') = SEX_ASK_TRM Age_group_5
Education WGHTS_PROV_TRM /clodds ;
STRATA GEOSTRAT_TRM;
WEIGHT WGHTS_ANALYTIC_TRM;
RUN;
/*Adjusted risk ratio without considering the survey design*/
PROC GENMOD data = CLSAData ;
CLASS ORH_EXP_DRM_MCQ SEX_ASK_TRM(ref = 'F') Age_group_5(ref = '45-48')
Education(ref = 'Low Education') WGHTS_PROV_TRM(ref = 'AB') /param = ref;
MODEL ORH_EXP_DRM_MCQ(event = 'Yes') = SEX_ASK_TRM Age_group_5
Education WGHTS_PROV_TRM /dist = bin link = log ;
WEIGHT WGHTS_ANALYTIC_TRM;
ODS output ParameterEstimates = Est;
RUN;
DATA AdjustRR;
SET Est(where = (Parameter = 'SEX_ASK_TRM'));
AdjRR = exp(Estimate);
AdjRRLL = exp( LowerWaldCL) ;
AdjRRUL = exp( UpperWaldCL) ;
RUN;
/*Adjusted risk difference without considering the survey design*/
PROC GENMOD data = CLSAData ;
CLASS ORH_EXP_DRM_MCQ SEX_ASK_TRM(ref = 'F') Age_group_5(ref = '45-48')
Education(ref = 'Low Education') WGHTS_PROV_TRM(ref = 'AB') /param = ref;
MODEL ORH_EXP_DRM_MCQ(event = 'Yes') = SEX_ASK_TRM Age_group_5
Education WGHTS_PROV_TRM /dist = bin link = identity ;
WEIGHT WGHTS_ANALYTIC_TRM;
ODS output ParameterEstimates = FileOUT.AdjustRD ;
RUN;
SPSS
There is no formal procedure for obtaining adjusted odds ratios, relative risks and risk differences in \(\texttt{SPSS}\).
Stata
svyset entity_id, strata(StraVar) weight(WGHTS_ANALYTIC_TRM) vce(linearized)
singleunit(certainty)
*adjusted odds ratio
svy linearized: glm ORH_EXP_DRM_MCQ i.SEX_ASK_TRM i.Age_group_5 ib3.Education
i.WGHTS_PROV_TRM , fam(binomial) link(logit) eform
*adjusted relative risk
svy linearized: glm ORH_EXP_DRM_MCQ i.SEX_ASK_TRM i.Age_group_5 ib3.Education
i.WGHTS_PROV_TRM , fam(binomial) link(log) difficult iterate(30000) eform
*adjusted risk difference
*(Note:convergence not achieved. The results are for illusion only)
svy linearized: glm ORH_EXP_DRM_MCQ i.SEX_ASK_TRM i.Age_group_5 ib3.Education
i.WGHTS_PROV_TRM , fam(binomial) link(identity) difficult iterate(100000)
Result comparison
R | SAS | Stata | |
---|---|---|---|
Adjusted Odds ratio (M vs F) | |||
Estimate | 0.8403 | 0.8403 | 0.8403 |
95% lower confidence limit | 0.5081 | 0.5050 | 0.5081 |
95% upper confidence limit | 1.3897 | 1.3983 | 1.3897 |
Adjusted Relative risk (M vs F) | |||
Estimate | 0.8762 | 0.8762 | 0.8762 |
95% lower confidence limit | 0.6071 | 0.6794 | 0.5373 |
95% upper confidence limit | 1.2646 | 1.1301 | 1.4289 |
Adjusted Risk difference (M vs F) | |||
Estimate | -0.0217 | -0.0218 | -0.0219 |
95% lower confidence limit | -0.0981 | -0.0770 | -0.0976 |
95% upper confidence limit | 0.0546 | 0.0335 | 0.0538 |
We can see that all the packages give the same adjusted odds ratio, relative risk and risk difference. For the latter two cases, the \(\texttt{R}\) program and \(\texttt{Stata}\) give similar confidence limits as they consider the survey designs in the variance estimation. In contrast, \(\texttt{SAS}\) gives markedly narrower limits as it ignores the survey design without the SUDAAN package. The adjusted risk differences shown vary among the statistical packages as convergence is not achieved. The differences are due to various stopping criteria implemented in those program.