Signature
V_bin = (p_T * (1 - p_T) + p_C * (1 - p_C)) / 2; d_bin = (p_T - p_C) / sqrt(V_bin)
| Inputs | Definition | Unit |
|---|---|---|
p_T | Proportion of treated patients with the characteristic, at least 0 and at most 1 | proportion |
p_C | Proportion of untreated patients with the characteristic, at least 0 and at most 1 | proportion |
V_bin | Unweighted average of p times (1 minus p) in the two groups | squared proportion |
|---|---|---|
d_bin | Standardised difference in prevalence, read in absolute value | standard deviation units |
Function
Standardised mean difference family by choice of standardiser, with re-expression in instrument points
Maps a difference between two group means, or between two prevalences of a baseline covariate, and a chosen standard deviation S to a value in standard deviation units, and maps a pooled value back to points on a familiar instrument. The members of the family differ only in S. The pooled standard deviation form is Cohen's d, HE-FM-CD-001. Its small-sample corrected form, the standardised mean difference of Cochrane reviews, is HE-FM-HEDG-001 with the standard error HE-FM-HEDG-003. Pooling across studies is HE-FM-ADMA-001 or HE-FM-ADMA-005, the interval is HE-FM-AN-001 and the logistic conversion to a log odds ratio is HE-FM-CD-002. None of these is restated here. This package adds the standardisers those records lack, namely the comparator group standard deviation, an external standard deviation and the square root of the average of the two group variances used for covariate balance, together with the re-expression step. The mean difference itself belongs on the Mean Difference page. Notation follows the Standardised Mean Difference article.
Try this function
Implementations
Excel
Standardised difference of a binary covariate from named cells
With prevalences as proportions in named cells PrevTreated and PrevUntreated, the first formula returns the average variance in a cell named AvgVarianceBin and the second the signed standardised difference in a cell named BalanceBin.
=(PrevTreated*(1-PrevTreated)+PrevUntreated*(1-PrevUntreated))/2; =(PrevTreated-PrevUntreated)/SQRT(AvgVarianceBin)
Assumptions
At least one prevalence strictly inside its range for the binary standardised difference
If both prevalences are 0 or 1 then V_bin is zero. The difference is then undefined, and Excel returns #DIV/0! from the second formula.
Categorical covariates with several levels entered as binary indicators
Austin (2011) says a multilevel categorical variable can be represented using a set of binary indicator variables. Each indicator then has its own standardised difference (derived).
Worked examples
Diabetes prevalence before matching in the article's registry study
Illustrative registry study from the article, with diabetes prevalence 30% in treated and 22% in untreated patients. The average variance is 0.1908 and the standardised difference about 0.1831, shown as 0.18 in the article.
p_T = 0.30; p_C = 0.22; V_bin = 0.1908; d_bin = 0.1831
Diabetes prevalence after matching in the article's registry study
After matching the prevalences are 27% and 25%. The average variance is 0.1923 and the standardised difference about 0.0456, shown as 0.05 in the article.
p_T = 0.27; p_C = 0.25; V_bin = 0.1923; d_bin = 0.0456
Equal prevalences give a standardised difference of zero
Limiting case computed here for illustration. Equal prevalences of 25% give zero, with the average variance equal to that of either group.
p_T = 0.25; p_C = 0.25; V_bin = 0.1875; d_bin = 0
Common errors
Prevalences entered as percentages in the binary standardised difference
Entering 30 and 22 in place of 0.30 and 0.22 makes AvgVarianceBin equal to -666, and SQRT then returns #NUM! in Excel. A prevalence such as 30% typed with the percent sign is stored as 0.30 and works.
Standard error of a risk difference used as the denominator
Dividing by the standard error of HE-FM-ACTR-001 gives a test statistic. With 100 patients per group the article's diabetes difference gives about 1.295 in place of 0.183, computed here for illustration, and the figure grows with the sample.
Sources
Austin 2009 equation for the standardised difference of a binary covariate
Austin PC. Balance diagnostics for comparing the distribution of baseline covariates between treatment groups in propensity-score matched samples. Statistics in Medicine. 2009;28:3083-3107. Section 3.2, Standardized differences for comparing means and prevalences between groups, equation (2), read from the published equation image.
Austin 2011 on binary indicators for multilevel categorical covariates
Austin PC. An introduction to propensity score methods for reducing the effects of confounding in observational studies. Multivariate Behavioral Research. 2011;46(3):399-424. Section Balance Diagnostics, which gives the same definition for a dichotomous variable and says multilevel categorical variables can be represented using a set of binary indicator variables.
Canonical Identity
Stable URI · Machine-readable · Resolvable · CC BY 4.0
