*! version 5.0 20.04.2016

Title

distdicho -- The distributional method for dichotomizing normal
data allowing for assumptions of unequal variances (based on Sauzet et al 2014
and Peacock et al 2012)

Syntax

Distributional estimates following a two-sample t-test

distdicho
varlist

[if] [in]
[, options] cp(#)

Immediate form of distdicho

distdichoi
#obs1
#mean1
#sd1
#obs2
#mean2
#sd2
#cutpoint
#varr
#tail

options

Main
twovar if the two group outcome values are provided as two separate
variables

cp(#) value of the cut-point under or over which to compute
proportions

tail(string) provides the tail of the distribution in which the
proportions are computedrequired only for tail("upper")

varr(#) ratio of variances

unequal use correction for assumption of unequal variance ratio if ratio not provided

correction use correction for large effects

bootci calculate bootstrap confidence interval

nrep(#) modify number of bootstrap replicates

Description

distdicho first returns the results of a two-group unpaired ttest
(allowing for unequal variances in the unequal variances cases) followed
by the distributional estimates and their standard errors (see Sauzet et al 2014
and Peacock et al 2012) for a difference in proportions, risk ratio and odds
ratio for the two groups as well as providing the distributional confidence
intervals for the statistics estimated
(this assumes an asymptotic normal distribution of estimates and might
not be valid for small sample sizes. See Sauzet et al 2014 for details).
By default the first variable in varlist
is the outcome. The second variable is the group code.
Estimates are calculated using either assumption of equal variances in both group
(default) or assumption of unequal variance ratio (option varr for known
variance ratio and option unequal for correction for unknown variance ratio).

If the option twovar is specified, the two variables provide the outcome in each group. In all cases it is assumed
that there are only two groups.

distdichoi is the immediate form of distdicho; see immed.

Options

Main

twovar must be specified if the two variables provided are the outcome
values for each group. By default the first
variable provides the outcome values and the second the group categories:
exposed, unexposed.

cp(#) specifies the cutpoint under which the distributional proportions among the exposed
and the non-exposed (reference) are computed using the distributional method described in
Peacock et al 2012 and Sauzet et al 2014.
cp requires a real number.

tail(string) provides the tail of the distribution in which the proportions are to
be computed. The default is the lower tail, upper will provide estimates
in the upper tail.

varr(#) by default the the ratio of variances exposed/un-exposed is assumed to be one.
Other assumed ratios can be specified with the option varr.

unequal can be specified if no assumption can be made about the variance ratio, in which
case a correction to the standard errors is made for the added uncertainty.

correction for large effects sizes (>0.7)
a correction factor can be used (valid for difference in proportions only). See Sauzet et all 2014.

bootci Bootstrap bias corrected confidence intervals are calculated instead of
distributional ones using the command bootstrap
with 2000 replicates (default) under the hypothesis that the data is normal distributed
and that the variance is the known and equal to the data variance for the
default version or if the ratio of variances is known for the unequal variance case.

nrep(#) The number of bootstrap replicates can be altered. The default value is 2000.

Remarks

Confidence intervals are returned using the current level in the system. This level can be modified
using the command set level.

Examples

setup

. use bwsmoke

Proportions of low birthweight babies among smoking and non-smoking mothers
(Data from Peacock et al 1995)
(returns distributional estimates, standard error and distributional confidence
interval for differences in proportions, RR and OR of babies having a birthweight
under 2500g (low birthweight LBW) for group smoker (mother smokes) over the odds
of LBW in group non-smoker (mother doesn't smoke))

. distdicho birthwt smoke if gest>=37, cp(2500)

setup

. use bmi

Inverse Body Mass Index (BMI) (transformation required to have a normal outcome)
and parity (Data from Peacock et al 1995)(returns distributional estimates,
standard error and distributional confidence interval for differences in proportions,
RR and OR of obese mothers (BMI of >30 kg/m^2) for multipari (group_par=1) over
the odds of obesity in group primipari (group_par=0))

. distdicho inv_bmi group_par, cp(0.033)

setup

. use bmi2

Inverse Body Mass Index(BMI) and employment
(returns distributional estimates, standard error and distributional confidence
interval for differences in proportions, RR and OR with correction for
unknown variance ratio of obese mothers (weight of >30 kg/m^2) for group
employment=1 (mother employed) over the odds of obesity in group employmed=2
(mother unemployed))

. distdicho inv_bmi group_emp, cp(0.033) uneq

setup

. use bmi2

Inverse Body Mass Index(BMI) and employment (returns distributional estimates, standard error and distributional
confidence interval for differences in proportions,
RR and OR computed under the hypothesis that the ratio of variances is equal to 1.3
of obese mothers (BMI of >30 kg/m^2) for group employment=1 (mother employed)
over the odds of obesity in group employment=2 (mother unemployed))

. distdicho inv_bmi group_emp, cp(0.033) varr(1.3)

no setup required

immediate form (nobs1=494, mean1=3267.4, sd1=441.3, nobs2=983 mean2=3452,
sd2=435.9; cp=2500, tail=lower)

. distdichoi 494 3267.4 441.3 983 3452 435.9 2500 lower 1

Stored results

distdicho and distdichoi store the following in r():

Scalars

r(prop1) distributional proportion estimate for the group at risk

r(prop2) distributional proportion estimate for reference group

r(propdiff) distributional estimate for the difference in proportions between the group at risk and the reference group

r(distrr) distributional estimate for risk ratio between the group at risk and the reference group

r(distor) distributional estimate for odds ratio between the group at risk and the reference group

r(sediff) standard error for the distributional estimate of the difference in proportion

r(serr) standard error for the distributional estimate of the risk ratio

r(seor) standard error for the distributional estimate of the odds ratio

r(ciinf) difference in proportions: lower limit of the confidence interval

r(cisup) difference in proportions: upper limit of the confidence interval

r(ciinfrr) risk ratio: lower limit of the confidence interval

r(cisuprr) risk ratio: upper limit of the confidence interval

r(ciinfor) odss ratio: lower limit of the confidence interval

r(cisupor) odds ratio: upper limit of the confidence interval

References

Peacock J.L., Sauzet O., Ewings S.M., Kerry S.M. Dichotomising continuous data while retaining statistical power using a distributional approach. Statist. Med; 2012;26:3089-3103.

Sauzet, O., Peacock, J. L. Estimating dichotomised outcomes in two groups with unequal variances: a distributional approach. Statist. Med; 2014 33 4547-4559 ;DOI: 10.1002/sim.6255.

Peacock, J.L., Bland, J.M., Anderson, H.R.: Preterm delivery: effects of socioeconomic factors, psychological stress, smoking, alcohol, and caffeine. BMJ 311(7004), 531{535 (1995).

Authors

Odile Sauzet, Universität Bielefeld , odile.sauzet@uni-bielefeld.de

Maren Kleine , Universität Bielefeld

07.10.2015