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.
Arguments
- 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
xtr_median(), but can also bextr_mean()or any custom function that returns a number (a non-missing numeric vector of length 1). Ifna_rmis true,NAvalues are dropped before calling the function.- threshold
A number of the threshold value.
- na_rm
A flag specifying whether to remove missing values.
Value
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.
See also
Other summary:
directional_information(),
kurtosis(),
lower(),
probability_direction(),
pvalue(),
pzeros(),
skewness(),
svalue(),
upper(),
variance(),
xtr_mean(),
xtr_median(),
xtr_sd(),
zeros(),
zscore()
