*! version 2.0 23Sept2013

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 for the comparison of proportions assocuated to a comparison of means.

distdicho
varlist

[if] [in]
[, options]

Immediate form of the distributional estimates

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

options

Main
method type of variables used; default is first group provides the
outcome values and the second the group code

cp value of the cut-point under or above which to compute proportions

tail provides the tail of the distribution in which the proportions are computed

varr provides the ratio of variances

unequal use correction for assumption of unequal variance ratio

bootci calculate bootstrap confidence interval

nrep modify number of bootstrap replicates

Description

distdicho presents the results of a two-group unpaired ttest followed
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 95% confidence
interval for the statistics estimated. 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).
For the option method(method(var)), the first variable is the outcome for
group1 and the second variable is the outcome for group2. It is assumed
that there are only two groups. If there are more than two groups in
var2 then only data for the first and last group is used. For adjusted distributional estimate see reg_distdicho.

distdichoi is the immediate form of distdicho; see immed.

Options

Main

method Default is that the first group provides the outcome values and the
second the group code. If the two variables provided are the outcomes values for
each group then use the option var.

cp specifies the cutpoint under which the distributional proportions in group1
and group2 are computed using the distributional method described in Peacock et al.
cp requires a real number. When no value is given a cutpoint of 0 is used.

tail 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 The ratio of variance in group1 and variance in group2 to
address unequal variances (varr!=0) or correct the standard errors for unknown variance ratio (varr=0).
A variance ratio of 1 calculates the estimates for equal variances (default).

unequal specifies whether to use a correction for an unknown variance ratio.

bootci confidence intervals are calculated using bootstrap standard error corrected for bias instead of the distributional standad errors.

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

Remarks

The order in which the variables are given matters. The difference in proportion
in the distributional proportion in group1 minus the distributional proportion
in group2. The risk ratio is the risk of being under cutpoint in group1
over the risk in group2. The odds ratios are the odds of being under the cutpoint
in group1 over the odds in group2.
When using the immediate version the order in which the values are given should
be group characteristic of interest first (value=1, e.g. "smokers") followed by
the control group (value=0, e.g. "non-smokers").

Examples

setup

. webuse bwsmoke

Proportions of low birthweight babies among smoking and non-smoking mothers. 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 smoke=1 (mother smokes) over the odds
of LBW in group smoke=0 (mother doesn't smoke))

. distdicho birthwt smoke, cp(2500)

setup

. webuse bwsmoke

Proportions of low birthweight babies among smoking and non-smoking mothers.
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 smoke=1 (mother smokes) over the odds
of LBW in group smoke=0 (mother doesn't smoke). Observations of preterm babies
(week of gestation < 37th week) are excluded to avoid skewness of distribution.

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

setup

. webuse bw

Inverse Body Mass Index (BMI) and parity. Returns distributional estimates,
standard error and distributional confidence interval for differences in proportions,
RR and OR to compare the proportion of multipari (group_par=1)and primipari (group_par=0)
with obesity (BMI>30 kg/m^2). The distribution of BMI being skewed, the inverse values are taken.
Therefore the cut-point is 0.033 and the proportions are computed in the lower tail.

. distdicho inv_bmi group_par, cp(0.033)

setup

. webuse bw

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 employment=0 (mother unemployed)

. distdicho inv_bmi group_emp, cp(0.033) uneq

setup

. webuse bw

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 (weight of >30 kg/m^2) for group employment=1 (mother employed)
over the odds of obesity in group employment=0 (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 group1

r(prop2) distributional proportion estimate for group2

r(propdiff) distributional estimate for the difference in proportions between group1 and group2

r(distrr) distributional estimate for risk ratio between group1 and group2

r(distor) distributional estimate for odds ratio between group1 and group2

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 95% confidence interval

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

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

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

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

r(cisupor) odds ratio: upper limit of the 95% 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;DOI: 10.1002/sim.6255.

Authors

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