MaxBET {BET} | R Documentation |
MaxBET
stands for Binary Expansion Testing. It is used for nonparametric detection of nonuniformity or dependence. It can be used to test whether a column vector is [0, 1]-uniformly distributed. It can also be used to detect dependence between columns of a matrix X
, if X
has more than one column.
MaxBET( X, dep, unif.margin = FALSE, asymptotic = TRUE, plot = FALSE, index = list(c(1:ncol(X))) )
X |
a matrix to be tested. When |
dep |
depth of the binary expansion for the |
unif.margin |
logicals. If |
asymptotic |
logicals. If |
plot |
logicals. If |
index |
a list of indices. If provided, test the independence among two or more groups of variables. For example, |
MaxBET
tests the independence or uniformity by considering the maximal magnitude of the symmetry statistics in the sigma-field generated from marginal binary expansions at the depth d
.
Interaction |
a dataframe with p columns, where p is the number of columns of |
Extreme.Asymmetry |
the extreme asymmetry statistics. |
p.value.bonf |
p-value of the test with Bonferroni adjustment. |
z.statistic |
normal approximation of the test statistic. |
##test mutual independence v <- runif(128, -pi, pi) X1 <- cos(v) + 2.5 * rnorm(128, 0, 1/20) X2 <- sin(v) + 2.5 * rnorm(128, 0, 1/20) MaxBET(cbind(X1, X2), 3, asymptotic = FALSE, index = list(c(1), c(2))) ##test independence between (x1, x2) and y x1 = runif(128) x2 = runif(128) y = sin(4*pi*(x1 + x2)) + 0.4*rnorm(128) MaxBET(cbind(x1, x2, y), 3, index = list(c(1,2), c(3))) ##test uniformity x1 = rbeta(128, 2, 4) x2 = rbeta(128, 2, 4) x3 = rbeta(128, 2, 4) MaxBET(cbind(x1, x2, x3), 3)