Two functions: Xsq.nnsym.ss.ct
and Xsq.nnsym.ss
.
Both functions are objects of class "Chisqtest"
but with different arguments (see the parameter list below).
Each one performs the hypothesis test of equality of the expected value of the off-diagonal
cell counts (i.e., entries) under RL or CSR in the NNCT for \(k \ge 2\) classes.
That is, each performs Pielou's first type of NN symmetry test which is also equivalent to McNemar's
test on the NNCT. The test is appropriate (i.e., have the appropriate asymptotic sampling distribution)
provided that data is obtained by sparse sampling.
(See ceyhan:SWJ-spat-sym2014;textualnnspat for more detail).
Each symmetry test is based on the chi-squared approximation of the corresponding quadratic form
and are due to pielou:1961;textualnnspat.
The argument cont.corr is a logical argument (default=TRUE
) for continuity correction to this test.
If TRUE
the continuity correction to McNemar's test is implemented,
and if FALSE
such a correction is not implemented.
Each function yields the test statistic, \(p\)-value and df
which is \(k(k-1)/2\), description of the
alternative with the corresponding null values (i.e., expected values) of differences of the off-diagonal entries,(which is
0 for this function) and also the sample estimates (i.e., observed values) of absolute differences of th
off-diagonal entries of NNCT (in the upper-triangular form).
The functions also provide names of the test statistics, the description of the test and the data set used.
The null hypothesis is that \(E(N_{ij})=E(N_{ji})\) for all entries for \(i \ne j\) (i.e., symmetry in the
mixed NN structure).
In the output, the test statistic, \(p\)-value and df
are valid only for (properly) sparsely sampled data.
See also
(pielou:1961,ceyhan:SWJ-spat-sym2014;textualnnspat)
and the references therein.