Model-Free Functional Chi-Squared and Exact Tests
Statistical hypothesis testing methods for
inferring model-free functional dependency using asymptotic
chi-squared or exact distributions. Functional test
statistics are asymmetric and functionally optimal, unique
from other related statistics. Tests in this package reveal
evidence for causality based on the
causality-by-functionality principle. They include
asymptotic functional chi-squared tests
(Zhang & Song 2013) and an exact
functional test (Zhong & Song 2019)
. The normalized functional
chi-squared test was used by Best Performer 'NMSUSongLab'
in HPN-DREAM (DREAM8) Breast Cancer Network Inference
Challenges (Hill et al 2016) . A
function index (Zhong & Song 2019)
(Kumar et al 2018)
derived from the
functional test statistic offers a new effect size measure
for the strength of functional dependency, a better
alternative to conditional entropy in many aspects. For
continuous data, these tests offer an advantage over
regression analysis when a parametric functional form
cannot be assumed; for categorical data, they provide a
novel means to assess directional dependency not possible
with symmetrical Pearson's chi-squared or Fisher's exact
tests.
News
NEWS
Version 2.4.5-3
2018-12-04
- Updated simulate_tables() function to be more accurate when
generating small tables where row and column variables are
independent. Specifically, zero counts are now allowed.
- Updated tests for simulate_tables() in test_simulate.R.
- Introduced simulate_independent_tables() by reorganizing
preivous code. Noise is now applied along both rows and columns
(previously only along the rows). The funciton is in
simulate_tables.R.
- Modified prelim.check() in simulate_tables.R.
- Updated manual page for simulate_tables() accordingly.
- Updated the examples in the manual of plot_tables().
2018-11-01
- Added an argument in plot_table() to highlight row maxima with
a box.
2018-10-24
- Created version 2.4.5-3.
- Made "conditional function index" the default, previously
"unconditional", in fun.chisq.test(). Specifically, set the
default value of index.kind to "conditional". Previous "conditional
function index", specified by index.kind="conditional", is now
called "function index"; previous "function index", specified by
index.kind="unconditional" is now called "unconditional function
index". The "unconditional" option for function index will phase
out in future versions of the function.
- Added a new vignette "Examples of discrete patterns".
- Updated vignettes to include table visualization by
plot_table() function.
Version 2.4.5-2
2018-10-22
- Reintroduced a test source code file test_FunChisq.R back,
which was accidentally deleted from the previous version.
2018-10-17
- Added a plot_table() function to visualize a contingency table.
2018-10-16
- Created version 2.4.5-2.
- Included conditional FunChisq R code.
Version 2.4.5-1
2018-06-16
-
In the exact functional test C++ code, improved the numerical
precision of the FunChisq statistic using an equivalent
mathematical form already used in the R version. This fixed bugs
in the exact functional test when the table is of certain
dimension and sample size.
-
Added a few more test cases for the exact functional test.
-
Increased the maximum table size from 5x5 to 10x10 for the
exact functional test.
-
Added a warning message when asymptotic test is used in place
of the exact test to avoid long computational time.
-
Updated the DOI of the reference to exact functional test.
Version 2.4.5
2018-02-08
- Added a parameter "exact.mode.bound" in the fun.chisq.test()
function to switch ON/OFF the fast branch-and-bound algorithm in
the exact functional test.
- Updated testthat cases for exact functional test.
Version 2.4.4
2018-02-05
- Added a new reference (Zhong and Song, 2018) for exact
functional test.
- Changed the package title to "Chi-Square and Exact Tests for
Model-Free Functional Dependency"
2017-10-26
- Included a reference for the simulate_tables() function that
describes the strategies used by the function.
2017-06-11
- Updated the functional indices to be more accurate when the
number of row is less than the number of columns and also
when conditioned on the column sum.
2017-05-29
- Added "simulate.p.value" method option in fun.chisq.test()
to calculate p-value with Monte carlo simulated distribution.
2017-05-16
- Updated the vignette for choosing quantities for functional
dependencies.
2017-05-05
- Fixed a bug in simulating 'discontinuous' contingency tables
when the number of column is two.
- Updated manuals.
Version 2.4.3
2017-04-27
- Fixed a bug in specifying the margin to apply noise in
simulate_tables().
- Added a noise.model parameter in simulate_tables() to
specify either the "house" or "candle" noise model for applying
noise to contingency tables representing ordinal or categorical
data.
2017-04-25
- Revised package description and manuals.
Version 2.4.2
2017-04-20
- Renamed pattern type "nonmonotonic" to "many.to.one" in
simulate_tables(). The latter is mathematically correct.
- Added a "discontinuous" pattern type in simulate_tables().
- Added a new candle noise model for categorical variables.
- Sped up add.noise function code by taking advantage of
vectorized multinomial distribution R function.
Version 2.4.1
2017-04-02
- Revised the manual for function simulate_tables()
2017-02-28
- Suppressed warning messages when calling chisq.test() to
compute chi-squares in function simulate_tables().
- Edited the manual for simulate_tables().
- Edited other manuals for improved consistency with R package
reference format.
Version 2.4.0
2017-02-26
Changes
- Added a new R function simulate_tables() with supporting test functions.
- Added a new R function add.house.noise() with supporting test functions.
- Introduced the use of 'R_registerRoutines' and 'R_useDynamicSymbols'.
Version 2.3.4
Changes
2016-10-01
- Added keywords to the package manual.
Version 2.3.3
Changes
2016-09-02
- Updated the vignettes.
Version 2.3.2
Changes
2016-08-29
- Updated the reference section to fix the year of Pearson's chi-square test
paper which was published in 1900 not 1990.
2016-05-03
- Now check all options for the method argument so that only valid
methods are allowed.
Version 2.3.1
Changes
2016-05-01
- Expanded test.interactions() to test many-to-one combinatorial
interactions in C++ via Rcpp.
Version 2.3.0 (not deposited to CRAN)
Changes
2016-04-30
- Data frame input is now converted to numeric matrix before exact
functional test.
- Added function test.interactions() to test pairwise (one-to-one)
interactions, implemented in C++ via Rcpp for computational efficiency.
Version 2.2.4
Changes
2016-04-21
- Added vignette "Which statistic to use for functional dependency
from fun.chisq.test()?"
- Updated references and description.
Version 2.2.3
Changes
2016-03-31
- Use [[Rcpp::export]] to automatically generate R interface.
2016-03-15
- Revised the code to remove dependency on RcppClassic.
2016-03-12
- Revised help documentation and included new references.
Version 2.2.2
Changes
2016-02-07
- Handled a special case for the normalized FunChisq when the degrees of
freedom are zero.
2016-02-05
- Renamed the "type" argument to "alternative" in fun.chisq.test().
- Revised values of the "method" argument in fun.chisq.test(). Previous
values ("default" and "normalized") are still supported but obsolete.
- Added the "log.p" argument in both cp.fun.chisq.test() and cp.chisq.test().
- Updated the documentation.
2016-01-30
- Added a new argument "index.kind" to fun.chisq.test() to specify
the function index kind: "unconditional" or "conditional" on a given
marginal of Y.
2016-01-26
- Fixed a bug in cp.chisq.test().
Version 2.2.1
Changes
2016-01-25
- Fixed a bug introduced in the previous version.
- Updated package description to be more reflective of recent additions.
- Included missing references.
Version 2.2.0
Changes
2016-01-23
- Improved code efficiency for fun.chisq.test().
- Now fun.chisq.test() returns an estimate of function index between
0 and 1, in analogy to Cramer's V, but asymmetrical.
- Added additional test examples for fun.chisq.test().
2016-01-22
- Added type argument to fun.chisq.test() to specify functional or
non-constant functional chi-squares.
- Added log.p argument to fun.chisq.test() to obtain log of p-value
to improve accuracy when sample size is large and p-value is close
to zero.
2015-07-03 (Unpublished version 2.1.1 )
- Added cp.chisq.test() for comparative chi-square test, not considering
functional dependencies.
- Added test examples for cp.chisq.test().
Version 2.1.0 2015-06-29
Changes
- Substantially reduced the run time of exact functional test by designing a
better branch and bound strategy.
- Enabled C++11 compling by adding two files (Makevars and Makevars.win).
- Fixed a bug occured under WIN32 using long double by adding define.h to
specify double precision for WIN32 and long double precision for WIN64.
- Increased float comparison precision by considering a tolerance.
- Imported pnorm() and pchisq() from the "stats" package.
Version 2.0.2 2015-03-03
Changes
- Updated documentation for the package and its functions.
- Fixed a testing issue under r-release-linux-ix86 flavor.
Version 2.0.1 2015-02-23
Changes
- Removed assert() function from StatDistribution.cpp.
- Removed Makevar and Makevar.win files.
- Removed all iostream and sstream and cassert.
- Removed TransitionTableIO.cpp.
- In the testthat examples, signif(x,8) is used to compare 8 significant
digits of the results.
- Added a normalized functional chi-square test example.
Version 2.0.0 2015-02-12
Changes
- Added a new exact functional test as a method option to fun.chisq.test().
The exact functional test is an exact version of FunChisq test, it is
more precise to detect functional dependencies in small sample-sized
contingency tables.
- Added a new comparative functional chi-square test for detecting
heterogeneity in functional dependencies among contingency tables.
- Revised the examples and documentation to improve usability.
- Added automated test cases into the package.
- Started the NEWS file.
Version 1.0 2014-03-08
Changes
- The first release of this package implements the functional chi-square
test and a normalized version.