funsZself.ref | R Documentation |
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, (1,1)
) in the RCT for k \ge 2
classes.
That is, each test performs a test of self reflexivity corresponding to entry (1,1)
in the RCT)
which is appropriate (i.e., have the appropriate asymptotic sampling distribution) for completely mapped data.
(See \insertCiteceyhan:NNreflexivity2017;textualnnspat for more detail).
The self reflexivity test is based on the normal approximation of the diagonal entry (1,1)
in the RCT and are due to \insertCiteceyhan:NNreflexivity2017;textualnnspat.
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
self reflexivity value (i.e., diagonal entry (1,1)
value, respectively) in the RCT,
and method and name of the data set used.
The null hypothesis is that E(N_{11})=R P_{aa}
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.
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 (1,1)
in RCT while 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,
...
)
rfct |
An RCT, used in |
nvec |
The |
alternative |
Type of the alternative hypothesis in the test, one of |
conf.level |
Level of the upper and lower confidence limits, default is |
dat |
The data set in one or higher dimensions, each row corresponds to a data point,
used in |
lab |
The |
... |
are for further arguments, such as |
A list
with the elements
statistic |
The |
p.value |
The |
conf.int |
Confidence interval for the self reflexivity value (i.e., diagonal entry |
estimate |
Estimate of the parameter, i.e., the observed diagonal entry |
null.value |
Hypothesized null value for the self reflexivity value (i.e., expected value of the
diagonal entry |
alternative |
Type of the alternative hypothesis in the test, one of |
method |
Description of the hypothesis test |
ct.name |
Name of the contingency table, |
data.name |
Name of the data set, |
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")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.