Learn R Programming

groupdata2 (version 2.0.5)

ranked_balances: Extract ranked standard deviations from summary

Description

lifecycle::badge("experimental")

Extract the standard deviations (default) from the "Summary" data.frame from the output of summarize_balances(), ordered by the `SD_rank` column.

See examples of usage in summarize_balances().

Usage

ranked_balances(summary, measure = "SD")

Value

The rows in `summary` where `measure` == "SD", ordered by the `SD_rank` column.

Arguments

summary

"Summary" data.frame from output of summarize_balances().

Can also be the direct output list of summarize_balances(), in which case the "Summary" element is used.

measure

The measure to extract rows for. One of: "mean", "median", "SD", "IQR", "min", "max".

The most meaningful measures to consider as metrics of balance are `SD` and `IQR`, as a smaller spread of variables across group summaries means they are more similar.

NOTE: Ranks are of standard deviations and not affected by this argument.

Author

Ludvig Renbo Olsen, r-pkgs@ludvigolsen.dk

See Also

Other summarization functions: summarize_balances(), summarize_group_cols()