Description Usage Arguments Details Value References See Also

This function is for internal package use only. See `smd`

for usage.

1 2 3 | ```
compute_smd_pairwise(smd_parts)
compute_smd(D, S)
``` |

`smd_parts` |
a |

`D` |
vector of differences for each level of a factor (will be length 1 for numeric values) |

`S` |
the covariance matrix |

Computes:

*
d = √{D' S^{-1} D}
*

where *D* is a vector of differences between group 1 and 2 and *S* is
the covariance matrix of these differences. If *D* is length 1, the result
is multplied by *sign(D)*.

In the case of a `numeric`

or `integer`

variable, this is equivalent
to:

*
d = \frac{\bar{x}_1 - \bar{x}_2}{√{(s^2_1 + s^2_2)/2}}
*

where *\bar{x}_g* is the sample mean for group *g* and *s^2_g*
is the sample variance.

For a `logical`

or `factor`

with only two levels, the equation above is
*\bar{x}_g = \hat{p}_g*, i.e. the sample proportion and *s^2_g = \hat{p}_g(1 - \hat{p}_g)*
(NOTE: interally `smd`

uses the `var`

function, which
uses *n-1* as the denominator. Hence, in small samples, *s^2_g* will
not be precisely *\hat{p}_g(1 - \hat{p}_g)*).

a single numeric value

Yang, D., & Dalton, J. E. (2012, April). A unified approach to measuring the effect size between two groups using SAS®. In SAS Global Forum (Vol. 335, pp. 1-6)

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.