*! version 1.0 5 Jan 2022

Title

rori -- Immediate command for estimation of selection bias through
relative odds ratio (ROR) with large sample confidence interval

Syntax

rori,
targetpopulation(a matrix name or a matrix definition)
responsepopulation(a matrix name or a matrix definition)
[options]

Required

targetpopulation a matrix name or a matrix definition of
exposure (rows) and maybe an binary outcome (columns) for the target population

responsepopulation a matrix name or a matrix definition of
exposure (rows) and maybe an binary outcome (columns) for the response population.
Note that all the cell values in the response population must be lower than or equal to the cell values in the target population

Optional

reference(integer) Set reference row number in ror table

Description

rori calculates the relative odds ratios (ROR) in a exposure by
binary outcome table.

rori also calculates the ratios of relative frequencies (RRF) of
the exposure groups.

The key point in rori is that Nohr(2006) produces a formula for
"the asymptotic variance of the difference between the estimate based on a
random subpopulation and that based on the total population,
Var[estimate_sub - estimate_tot] = Var[estimate_sub] - Var[estimate_tot]".

The relative odds ratio (ROR) is used to quantify selection bias. (Nohr 2018, modified)

"Response bias is an often neglected consideration when evaluating the
results of epidemiologic surveys, usually because of a paucity of information
about nonrespondents." (Austin 1981)

"The effect of nonparticipation was described by a relative odds ratio
(ROR), calculated as the OR (participants)/ OR (source population)" (Nohr 2006)

"The relative odds ratio (ROR) computed as the cross product ratio of the
participation rates in the four exposure by outcome categories" (Nohr 2018)

In other words, the log of the relative odds ratio (ROR) is a contrast of
the log of the participation rates in the four outcomes by exposure categories

The method for the confidence interval was based on the observation that,
if the subsample is a random sample from the total sample, then for large samples
we have Var[ROR] as the square root of Var(OR response) - Var(OR target) (Nohr 2006, modified)

"The formula (for Var[ROR]) does not hold in general, ie,
if the subsample is not a random sample from the total sample." (Nohr 2006, modified)

"The method of calculating confidence intervals gave almost identical
results using non-parametric bootstrap. (Nohr 2006, modified)

"The simple approach based on equation 1 gave 95% confidence intervals
with coverage probabilities in the range from 94.4% to 96.0%" (Nohr 2006)

Examples

Immediate inputs

Data are rounded and from Table 1 and Table 2 in (Austin 1981)

`"rori, t(30, 63 \ 401, 2807) r(25, 45 \ 347, 2313)"'

To see the returned matrix:

`"matlist r(ror)"'

`"matlist r(rrf)"'

If there is only one column in the entered tables/matrices, only the
the ratios of relative frequencies (RRF) are returned:

`"rori, t(22193 \ 17277 \ 9065) r(7719 \ 5297 \ 2291)"'

To see the returned matrix:

`"matlist r(rrf)"'

Using datasets

Consider the data:

//www.stata-press.com/data/r17/nhanes2.dta", clear"'

In the following, it is wrongly assumed that the rural subpopulation is a random sample from the whole population.

We want to investigate whether there is selection bias for the
age proportions in the rural population compared to whole population.

Generate the target matrix (age distribution for the whole population):

`"tab agegrp, matcell(tgtage)"'

`"matrix rownames tgtage = 20- 30- 40- 50- 60- 70+"'

`"matrix colnames tgtage = n"'

Generate the response matrix (age distribution for the rural population):

`"tab agegrp if rural, matcell(rspage)"'

`"matrix rownames rspage = 20- 30- 40- 50- 60- 70+"'

`"matrix colnames rspage = n"'

Use rori to get the ratios of relative frequencies (RRF) with
confidence intervals

`"rori, t(tgtage) r(rspage)"'

`"matlist r(rrf)"'

We want to investigate whether there is selection bias for the effect
(odds ratio) of age proportions on high blood pressure limiting data to the
rural part of the whole population.

Generate the target matrix (age distribution by high blood pressure for
the whole population):

`"tab agegrp highbp, matcell(tgtage)"'

`"matrix rownames tgtage = 20- 30- 40- 50- 60- 70+"'

`"matrix colnames tgtage = no yes"'

Generate the target matrix (age distribution by high blood pressure for
the rural population):

`"tab agegrp highbp if rural, matcell(rspage)"'

`"matrix rownames rspage = 20- 30- 40- 50- 60- 70+"'

`"matrix colnames rspage = n yes"'

Use rori to get the relative odds ratios (ROR) with
confidence intervals

`"rori, t(tgtage) r(rspage)"'

`"matlist r(ror)"'

rori also returns the ratios of relative frequencies (RRF) by
outcome values with confidence intervals

`"matlist r(rrf)"'

As a default the reference row for relative odds ratios (ROR) is the
first. With option reference(integer) another reference row can be chosen.
Row 3 is chosen beow:

`"rori, t(tgtage) r(rspage) ref(3)"'

`"matlist r(ror)"'

The ratios of relative frequencies (RRF) are unchanged by this option.

`"matlist r(rrf)"'

Stored results

Matrices

r(ror) Matrix with the odds ratios exposure by outcome table
for the response, the odds ratios exposure by outcome table
for the target, and the relative odds ratio (ROR).
All with confidence interval.

r(rrf) The ratios of relative frequencies (RRF) with confidence
intervals.

Author and support

Author:

Niels Henrik Bruun,

Aalborg University Hospital

Author:

Victoria Petrine Lindblad Nielsen,

Aalborg University Hospital

Support:

niels.henrik.bruun@gmail.com

References

Austin MA, Criqui MH, Barrett-Connor E, Holdbrook MJ.
The effect of response bias on the odds ratio.
Am J Epidemiol. 1981;114:137–43

Nohr EA, Frydenberg M, Henriksen TB, Olsen J.
Does low participation in cohort studies induce bias?
Epidemiology. 2006;17:413–8

Nohr EA, Liew Z.
How to investigate and adjust for selection bias in cohort studies.
Acta Obstet Gynecol Scand. 2018 Apr;97(4):407-41