cp.fun.chisq.test {FunChisq} | R Documentation |
Comparative Chi-Squared Test for Model-Free Functional Heterogeneity
Description
Comparative functional chi-squared tests on two or more contingency tables.
Usage
cp.fun.chisq.test(
x, method = c("fchisq", "nfchisq", "default", "normalized"),
log.p = FALSE
)
Arguments
x |
a list of at least two matrices representing contingency tables of the same dimensionality. |
method |
a character string to specify the method to compute the functional chi-squared statistic and its p-value. The default is Note: |
log.p |
logical; if |
Details
The comparative functional chi-squared test determines whether the patterns underlying the contingency tables are heterogeneous in a functional way (Zhang 2014). Specifically, it evaluates whether the column variable is a changed function of the row variable across the contingency tables.
Two methods are provided to compute the functional chi-squared statistic and its p-value. When method = "fchisq"
(or "default"
), the p-value is computed using the chi-squared distribution; when method =
"nfchisq"
(or "normalized"
) a normalized statistic is obtained by shifting and scaling the original statistic and a p-value is computed using the standard normal distribution (Box et al. 2005)
(Box et al., 2005). The normalized test is more conservative on the degrees of freedom.
Value
A list with class "htest
" containing the following components:
statistic |
functional heterogeneity statistic if |
parameter |
degrees of freedom. |
p.value |
p-value of the comparative functional chi-squared test. By default, it is computed by the chi-squared distribution. If |
Author(s)
Yang Zhang and Joe Song
References
Box GE, Hunter JS, Hunter WG (2005).
Statistics for Experimenters: Design, Innovation and Discovery, 2nd edition.
Wiley-Interscience, New York.
Zhang Y (2014).
Nonparametric Statistical Methods for Biological Network Inference.
Ph.D. thesis, Department of Computer Science, New Mexico State University, Las Cruces, NM, USA.
See Also
For comparative chi-squared test that does not consider functional dependencies, cp.chisq.test
.
Examples
x <- matrix(c(4,0,4,0,4,0,1,0,1), 3)
y <- t(x)
z <- matrix(c(1,0,1,4,0,4,0,4,0), 3)
data <- list(x,y,z)
cp.fun.chisq.test(data)
cp.fun.chisq.test(data, method="nfchisq")