Two functions: Xsq.nnref.ct
and Xsq.nnref
.
Both functions are objects of class "Chisqtest"
but with different arguments (see the parameter list below).
Each one performs hypothesis tests of equality of the expected values of the
diagonal cell counts (i.e., entries) under RL or CSR in the RCT for \(k \ge 2\) classes.
That is, each test performs an overall NN reflexivity test (for the vector of entries \((1,1)\) and \((2,2)\),
respectively, in the RCT) which is
appropriate (i.e., have the appropriate asymptotic sampling distribution) for completely mapped data.
(See ceyhan:NNreflexivity2017;textualnnspat for more detail).
Each reflexivity test is based on the chi-squared approximation of the corresponding quadratic form
for the vector of diagonal entries
in the RCT and are due to ceyhan:NNreflexivity2017;textualnnspat.
Each function yields the test statistic, \(p\)-value and df
which is 2, description of the
alternative with the corresponding null values (i.e., expected values) of the diagonal entries
and also the sample estimates (i.e., observed values) of the diagonal entries of RCT (as a vector).
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_{11},N_{22})=(R P_{aa},R P_{ab})\) in the RCT, where \(R\) is the number of reflexive
NNs and \(P_{aa}\) is the probability of any two points selected are being from the same class
and \(P_{ab}\) is the probability of any two points selected are being from two different classes.