| direction | R Documentation |
The direction of a distribution is the side (left/right) that the distribution's center falls on, relative to a threshold. The center can be calculated using a user-specified function, including the median (default), mean, geometric mean, mode, or any other custom function. By convention, values below the threshold fall to the left, while values above the threshold fall to the right. Center estimates equal to the threshold are assumed to fall to the right.
direction(x, estimate = xtr_median, threshold = 0, na_rm = FALSE)
x |
A numeric vector of MCMC values or any other numeric vector of samples. |
estimate |
A function for estimating the center of the distribution.
Defaults to |
threshold |
A number of the threshold value. |
na_rm |
A flag specifying whether to remove missing values. |
A string indicating if at least half of the observations are above
the threshold ("right") or not ("left"), or NA_character_ in the case
of missing values when na_rm = FALSE.
Other summary:
directional_information(),
kurtosis(),
lower(),
probability_direction(),
pvalue(),
pzeros(),
skewness(),
svalue(),
upper(),
variance(),
xtr_mean(),
xtr_median(),
xtr_sd(),
zeros(),
zscore()
direction(c(1, 2, 3))
direction(c(-1))
direction(c(0, 0, 0))
direction(c(-100, 1, 1))
direction(c(-100, 1, 1), mean)
direction(c(100, 0.01, 0.01), function(.x) exp(mean(log(.x))))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.