| upsilon.test | R Documentation |
Performs the Upsilon test to evaluate association among categorical variables represented by a contingency table.
upsilon.test(x, log.p = FALSE)
x |
a matrix or data frame of floating or integer numbers to specify a contingency table. Entries must be non-negative. |
log.p |
a logical. If |
The Upsilon test is designed to promote dominant function patterns. In contrast to other tests of association to favor all function patterns, it is unique in demoting non-dominant function patterns.
Null hypothesis (H_0): Row and column variables are
statistically independent.
Null population: A discrete uniform distribution, where each entry in the table has the same probability.
Null distribution: The Upsilon test statistic
asymptotically follows a chi-squared distribution
with (nrow(x) - 1)(ncol(x) - 1) degrees of freedom,
under the null hypothesis on the null population.
See \insertCiteluo2021upsilonUpsilon for full details of the Upsilon test.
A list with class "htest" containing:
statistic |
the value of the Upsilon statistic. |
parameter |
the degrees of freedom. |
p.value |
the p-value. |
estimate |
the effect size. |
method |
a character string giving the test name. |
data.name |
a character string giving the name of input data. |
observed |
the observed counts, a matrix copy of the input data. |
expected |
the expected counts under the null hypothesis using the observed marginals. |
luo2021upsilonUpsilon
library("Upsilon")
# A contingency table with independent row and column variables
x <- matrix(
c(1, 1, 0,
1, 1, 0,
1, 1, 0),
nrow = 3, byrow = TRUE
)
print(x)
upsilon.test(x)
# A contingency table with a non-dominant function
x <- matrix(
c(4, 0, 0,
0, 1, 0,
0, 0, 1),
nrow = 3, byrow = TRUE
)
print(x)
upsilon.test(x)
# A contingency table with a dominant function
x <- matrix(
c(2, 0, 0,
0, 2, 0,
0, 0, 2),
nrow = 3, byrow = TRUE)
print(x)
upsilon.test(x)
# Another contingency table with a dominant function
x <- matrix(
c(3, 0, 0,
0, 3, 0,
0, 0, 0),
nrow = 3, byrow = TRUE)
print(x)
upsilon.test(x)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.