Description Usage Arguments Details Value Examples
Jensen-Shannon Divergence
1 |
formula |
A formula of the form 'x1 ~ x2 + x3 + x4 + x5'. In this example, the JSD assumes x1 is the group variable and x2 through x5 are covariates. All variabels must be categorical (character or factor). |
data |
A data frame containing all variables mentioned in 'formula'. |
This function produces objects of class 'jsd_balance', each of which is a list containing the following elements:
1. freqs - the cell frequencies of the 2x2 table of the grouping variable against the covariate.
2. cell_contribs - individual cell contributions to the Jensen-Shannon divergence (JSD).
3. group_contribs - group-level contributions to the JSD. These are the column sums of 'cell_contribs'.
4. cov_contribs - covariate-level contributions to the JSD. These are the row sums of 'cell_contribs'.
5. jsd - overall JSD measure. This is the sum of all elements in 'cell_contribs'.
A named list with entries for each variable on the righthand side of 'formula'. See details.
1 2 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.