overview | R Documentation |
This function caluclated basic descriptive statistics for a numerical variable. It can calculate an overall summary, or broken down by the levels of a grouping variable. Inputs can be summary data, vectors, or a data frame.
overview(
data = NULL,
outcome_variable = NULL,
grouping_variable = NULL,
means = NULL,
sds = NULL,
ns = NULL,
grouping_variable_levels = NULL,
outcome_variable_name = "My Outcome Variable",
grouping_variable_name = NULL,
conf_level = 0.95,
assume_equal_variance = FALSE
)
data |
|
outcome_variable |
|
grouping_variable |
|
means |
For summary data - A vector of 1 or more numerical means |
sds |
For summary data - A vector of standard deviations, same length as means |
ns |
For summary data - A vector of sample sizes, same length as means |
grouping_variable_levels |
For summary data - An optional vector of group labels, same length as means. If not passed, auto-generated. |
outcome_variable_name |
Optional friendly name for the outcome variable. Defaults to 'My Outcome Variable'. Ignored if a data-frame is passed, this argument is ignored. |
grouping_variable_name |
Optional friendly name for the grouping variable. If a data frame is passed, this argument is ignored. |
conf_level |
The confidence level for the confidence interval. Given in decimal form. Defaults to 0.95. |
assume_equal_variance |
Defaults to FALSE |
Returns a table of descriptive statistics
# From Summary data --------------------------------------
overview(
means = c(37.5, 31.9, 41.2, 33.4, 29.9, 38.3),
sds = c(10, 13.5, 14.8, 10, 8.7, 10),
ns = c(19, 19, 19, 19, 19, 19),
grouping_variable_levels = c(
"NFree10", "AFree10", "ADiet10", "NFree17", "AFree17", "ADiety17"
),
outcome_variable_name = "% time near target",
grouping_variable_name = "Diet",
assume_equal_variance = TRUE
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.