centrality_description {statsExpressions} | R Documentation |
Parametric, non-parametric, robust, and Bayesian measures of centrality.
centrality_description( data, x, y, type = "parametric", conf.level = NULL, tr = 0.2, k = 2L, ... )
data |
A data frame (or a tibble) from which variables specified are to
be taken. Other data types (e.g., matrix,table, array, etc.) will not
be accepted. Additionally, grouped data frames from |
x |
The grouping (or independent) variable in |
y |
The response (or outcome or dependent) variable from |
type |
A character specifying the type of statistical approach:
You can specify just the initial letter. |
conf.level |
Scalar between |
tr |
Trim level for the mean when carrying out |
k |
Number of digits after decimal point (should be an integer)
(Default: |
... |
Currently ignored. |
This function describes a distribution for y
variable for each level of the
grouping variable in x
by a set of indices (e.g., measures of centrality,
dispersion, range, skewness, kurtosis, etc.). It additionally returns an
expression containing a specified centrality measure. The function internally
relies on datawizard::describe_distribution()
function.
The table below provides summary about:
statistical test carried out for inferential statistics
type of effect size estimate and a measure of uncertainty for this estimate
functions used internally to compute these details
Type | Measure | Function used |
Parametric | mean | datawizard::describe_distribution() |
Non-parametric | median | datawizard::describe_distribution() |
Robust | trimmed mean | datawizard::describe_distribution() |
Bayesian | MAP | datawizard::describe_distribution() |
# for reproducibility set.seed(123) # ----------------------- parametric ----------------------- centrality_description(iris, Species, Sepal.Length) # ----------------------- non-parametric ------------------- centrality_description(mtcars, am, wt, type = "n") # ----------------------- robust --------------------------- centrality_description(ToothGrowth, supp, len, type = "r") # ----------------------- Bayesian ------------------------- centrality_description(sleep, group, extra, type = "b")