Two functions: Zdir.nnct.ss.ct
and Zdir.nnct.ss
.
Both functions are objects of class "htest"
but with different arguments (see the parameter list below).
Each one performs hypothesis tests of independence in the \(2 \times 2\) NNCT which implies \(Z_P=0\)
or equivalently \(N_{11}/n_1=N_{21}/n_2\).
\(Z_P=(N_{11}/n_1-N_{21}/n_2)\sqrt{n_1 n_2 n/(C_1 C_2)}\)
where \(N_{ij}\) is the cell count in entry \(i,j\), \(n_i\) is the sum of row \(i\) (i.e., size of class \(i\)),
\(c_j\) is the sum of column \(j\) in the \(2 \times 2\) NNCT;
\(N_{11}/n_1\) and \(N_{21}/n_2\) are also referred to as the phat estimates in row-wise binomial framework
for \(2 \times 2\) NNCT (see ceyhan:jnps-NNCT-2010;textualnnspat).
That is, each performs directional (i.e., one-sided) tests based on the \(2 \times 2\) NNCT and is appropriate
(i.e., have the appropriate asymptotic sampling distribution)
when that data is obtained by sparse sampling.
(See ceyhan:jnps-NNCT-2010;textualnnspat for more detail).
Each test is based on the normal approximation of \(Z_P\) which is the directional \(Z\)-tests for the chi-squared
tests of independence for the contingency tables bickel:1977nnspat.
Each function yields the test statistic, \(p\)-value for the
corresponding alternative, the confidence interval, sample estimate (i.e., observed value) and
null (i.e., expected) value for the difference in the phat values (which is 0 for this test) in an NNCT,
and method and name of the data set used.
The null hypothesis is that \(E[Z_P] = 0\) or equivalently \(N_{11}/n_1 = N_{21}/n_2\).