bfslice_u: Dependency detection between a level \(k\) (\(k > 1\)) categorical variable and a continuous variable via Bayes factor.
Description
Dependency detection between a level \(k\) (\(k > 1\)) categorical variable x and a continuous variable y via Bayes factor.
Usage
bfslice_u(x, dim, lambda, alpha)
Value
Value of Bayes factor (nonnegative). Bayes factor could be treated as a statistic and one can take some threshold then calculates the corresponded Type I error rate. One can also take the value of Bayes factor for judgement.
Arguments
x
Vector: observations of categorical variable, \(0,1,\ldots,k-1\) for level \(k\) categorical variable, should be ranked according to values of continuous variable y, either ascending or descending.
dim
Level of x, equals \(k\).
lambda
lambda corresponds to the probability that makes slice in each possible position. lambda should be greater than 0.
alpha
alpha is hyper-parameter of the prior distribution of frequency in each slice. alpha should be greater than 0 and less equal than \(k\).
References
Jiang, B., Ye, C. and Liu, J.S. Bayesian nonparametric tests via sliced inverse modeling. Bayesian Analysis, 12(1): 89-112, 2017.