An object of class "htest"
performing 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=2\) classes.
That is, the test performs Dixon's or Pielou's (first type of) NN symmetry test which is appropriate
(i.e., have the appropriate asymptotic sampling distribution)
for completely mapped data and for sparsely sample data, respectively.
(See ceyhan:SWJ-spat-sym2014;textualnnspat for more detail).
The symmetry test is based on the normal approximation of the difference of the off-diagonal entries in the NNCT and are due to pielou:1961,dixon:1994;textualnnspat.
The type="dixon"
refers to Dixon's NN symmetry test and
type="pielou"
refers to Pielou's first type of NN symmetry test.
The function yields the test statistic, \(p\)-value for the corresponding alternative, the confidence interval, estimate and null value for the parameter of interest (which is the difference of the off-diagonal entries in the NNCT), and method and name of the data set used.
The null hypothesis is that all \(E(N_{12})=E(N_{21})\) in the \(2 \times 2\) NNCT (i.e., symmetry in the mixed NN structure).
See also (pielou:1961,dixon:1994,ceyhan:SWJ-spat-sym2014;textualnnspat) and the references therein.
Znnsym2cl(
dat,
lab,
type = "dixon",
alternative = c("two.sided", "less", "greater"),
conf.level = 0.95
)
A list
with the elements
The \(Z\) test statistic for Pielou's first type of NN symmetry test
The \(p\)-value for the hypothesis test for the corresponding alternative
Confidence interval for the difference of the off-diagonal entries, \(N_{12}-N_{21}\) in the \(2 \times 2\) NNCT
at the given confidence level conf.level
and depends on the type of alternative
.
Estimate, i.e., the difference of the off-diagonal entries of the \(2 \times 2\) NNCT, \(N_{12}-N_{21}\).
Hypothesized null value for the expected difference between the off-diagonal entries, \(E(N_{12})-E(N_{21})\) in the \(2 \times 2\) NNCT, which is 0 for this function.
Type of the alternative hypothesis in the test, one of "two.sided"
, "less"
, "greater"
Description of the hypothesis test
Name of the data set, dat
, or name of the contingency table, ct
The data set in one or higher dimensions, each row corresponds to a data point.
The vector
of class labels (numerical or categorical)
The type of the NN symmetry test with default="dixon"
.
Takes on values "dixon"
and "pielou"
for Dixon's and Pielou's (first type) NN symmetry test
Type of the alternative hypothesis in the test, one of "two.sided"
, "less"
or "greater"
.
Level of the upper and lower confidence limits, default is 0.95
,
for the difference of the off-diagonal entries, \(N_{12}-N_{21}\)
Elvan Ceyhan
Znnsym2cl.ss.ct
, Znnsym2cl.ss
, Znnsym2cl.dx.ct
,
Znnsym2cl.dx
, Znnsym.ss.ct
, Znnsym.ss
, Znnsym.dx.ct
,
Znnsym.dx
, Znnsym.dx.ct
, Znnsym.dx
and Znnsym
n<-20 #or try sample(1:20,1)
Y<-matrix(runif(3*n),ncol=3)
cls<-sample(1:2,n,replace = TRUE) #or try cls<-rep(1:2,c(10,10))
Znnsym2cl(Y,cls)
Znnsym2cl(Y,cls,type="pielou")
Znnsym2cl(Y,cls,alt="g")
Znnsym2cl(Y,cls,type="pielou",alt="g")
Run the code above in your browser using DataLab