help LogitToRisk

Title

logittorisk -- Stata module for conversion of logistic regression output to differences and ratios of risk

Syntax

Post-estimation command after a logit or logistic regression.

logittorisk, [r0(#) cat(#)]

When using logit, specify the option or

When using logistic, do not specify the option coef

Please ensure that the first variable is not a product term

Immediate form of the post-estimation command.

logittoriski #OR #LCI #UCI, [r0(#)]

Description

logittorisk computes the exposure/intervention group risk (r1) and a table of differences and ratios of risk from the baseline odds (constant) and odds ratio (from the first explanatory variable) obtained from a prior logistic regression.
This conversion is aimed at facilitating use of the OR in the reporting of clinical trials and meta-analyses because the OR is the “portable” effect measure, while the RR varies with baseline risk.

Modules required

Users need to install indeplist

Options

r0(#) specifies a baseline risk other than the one from the dataset used in the logit/logistic regression.
With logittoriski (immediate form) r0 must be specified, if not, then r0 = 0.5 is applied.
The value should range from 0.01 to 0.99.

cat(#) indicates the category of interest for a categorical exposure variable. If not specified, the first category is returned.
This does not apply to logittoriski (immediate form).

Saved results

Scalars

r(r0) baseline risk

r(r1) post-exposure risk based on the OR and r0

r(rr) risk ratio at the specified r0 for the variable of interest

r(rr_lci) lower confidence interval of the risk ratio

r(rr_uci) upper confidence interval of the risk ratio

r(rd) risk difference at the specified r0 for the variable of interest

r(rd_lci) lower confidence interval of the risk difference

r(rd_uci) upper confidence interval of the risk difference

r(nnt) number needed to treat at the specified r0 for the variable of interest

r(nnt_lci) lower confidence interval of the number neeed to treat

r(nnt_uci) upper confidence interval of the number neeed to treat

Examples

Example 1:

The data for the example is taken from Greenland et al. Stat Sci. 1999;14(1):29-46. doi: 10.1214/SS/1009211805.

. use http://fmwww.bc.edu/repec/bocode/l/logittorisk_example_data.dta

Logit or logistic regression model

. logit y x z, or

. logistic y x z

Regression model with interaction

. logit y x z x#z, or

. logit y x##z, or

. logit y x#z x z, or - this is not allowed as product term comes first

Conversion of the logit/logistic regression output to differences and ratios of risk, and baseline risk of 0.1

. logittorisk, r0(0.1)

Immediate form using an OR, its confidence interval, and baseline risk of 0.1

. logittoriski 2.667 1.705 4.171, r0(0.1)

Example 2:

The data for the example is taken from Stata (Hosmer & Lemeshow data)

. webuse lbw

Logit regression model - variable 'race' has three categories (white, black, other)

. logit low i.race smoke, or

Conversion of the logit/logistic regression output for variable 'race' and category 'other'

. logittorisk, cat(3)

Authors

Luis Furuya-Kanamori, UQ Centre for Clinical Research, The University of Queensland, Australia

l.furuya@uq.edu.au

Suhail AR Doi, Department of Population Medicine, College of Medicine, Qatar University, Qatar

Reference

Doi SA, Furuya-Kanamori L, Xu C, Lin L, Chivese T, Thalib L. Questionable utility of the relative risk in clinical research: A call for change to practice. J Clin Epidemiol. 2020 7:S0895-4356(20)31171-9. doi:10.1016/j.jclinepi.2020.08.019.

Funding

This work was supported by Program Grant #NPRP10-0129-170274 from the Qatar National Research Fund (a member of Qatar Foundation). The findings herein reflect the work and are solely the responsibility of the authors.

LFK was supported by an Australian National Health and Medical Research Council Fellowship (APP1158469).