Two functions: Zself.ref.ct
and Zself.ref
.
Both functions are objects of class "htest"
but with different arguments (see the parameter list below).
Each one performs hypothesis tests of self reflexivity in the NN structure using the
number of self-reflexive NN pairs (i.e., the first diagonal entry,
The self reflexivity test is based on the normal approximation of the diagonal entry
Each function yields the test statistic,
The null hypothesis is that
The Zself.ref
functions (i.e., Zself.ref.ct
and Zself.ref
) are different from the Znnref
functions (i.e., Znnref.ct
and Znnref
) and from Znnself
functions (i.e., Znnself.ct
and Znnself
), and also
from Znnself.sum
functions (i.e., Znnself.sum.ct
and Znnself.sum
).
Zself.ref
functions are for testing the self reflexivity for the entire data set
using entry Znnself
functions are testing the self reflexivity at a class-specific level
(i.e., for each class) using the first column in the SCCT, Znnref
functions are for testing the self
reflexivity and mixed non-reflexivity using the diagonal entries in the RCT, and
Znnself.sum
functions are testing the cumulative species correspondence using the sum of the self column (i.e.,
the first column) in the SCCT.
Zself.ref.ct(
rfct,
nvec,
alternative = c("two.sided", "less", "greater"),
conf.level = 0.95
)Zself.ref(
dat,
lab,
alternative = c("two.sided", "less", "greater"),
conf.level = 0.95,
...
)
A list
with the elements
The
The
Confidence interval for the self reflexivity value (i.e., diagonal entry conf.level
and depends on the type of alternative
.
Estimate of the parameter, i.e., the observed diagonal entry rfct
.
Hypothesized null value for the self reflexivity value (i.e., expected value of the
diagonal entry
Type of the alternative hypothesis in the test, one of "two.sided"
, "less"
, "greater"
Description of the hypothesis test
Name of the contingency table, rfct
, returned by Zself.ref.ct
only
Name of the data set, dat
, returned by Zself.ref
only
An RCT, used in Zself.ref.ct
only
The vector
of class sizes, used in Zself.ref.ct
only
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,
The data set in one or higher dimensions, each row corresponds to a data point,
used in Zself.ref
only
The vector
of class labels (numerical or categorical), used in Zself.ref
only
are for further arguments, such as method
and p
, passed to the dist
function, used in Zself.ref
only
Elvan Ceyhan
Znnref.ct
, Znnref
, Zmixed.nonref.ct
and
Zmixed.nonref
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))
ipd<-ipd.mat(Y)
nvec<-as.numeric(table(cls))
rfct<-rct(ipd,cls)
Zself.ref(Y,cls)
Zself.ref(Y,cls,method="max")
Zself.ref.ct(rfct,nvec)
Zself.ref.ct(rfct,nvec,alt="g")
#############
n<-40
Y<-matrix(runif(3*n),ncol=3)
cls<-sample(1:4,n,replace = TRUE) #or try cls<-rep(1:2,c(10,10))
ipd<-ipd.mat(Y)
nvec<-as.numeric(table(cls))
rfct<-rct(ipd,cls)
Zself.ref(Y,cls,alt="g")
Zself.ref.ct(rfct,nvec)
Zself.ref.ct(rfct,nvec,alt="l")
Run the code above in your browser using DataLab