funsZcell.spec | R Documentation |
Two functions: Zcell.spec.ct
and Zcell.spec
.
All functions are objects of class "cellhtest"
but with different arguments (see the parameter list below).
Each one performs hypothesis tests of deviations of
entries of NNCT or types I-IV TCTs from the expected values under RL or CSR for each entry.
The test for each entry i,j
is based on the normal approximation of the corresponding T_{ij}
value
and are due to \insertCitedixon:NNCTEco2002;textualnnspat
and \insertCiteceyhan:jkss-posthoc-2017;textualnnspat, respectively.
The type="dixon"
or "nnct"
refers to Dixon's cell-specific test of segregation, and
type="I"
-"IV"
refers to types I-IV cell-specific tests, respectively.
Each function yields a contingency table of the test statistics, p
-values for the corresponding
alternative, expected values (i.e., null value(s)), lower and upper confidence levels and sample estimates (i.e., observed values)
for the N_{ij}
or T_{ij}
values and also names of the test statistics, estimates, null values, the description of the test, and
the data set used.
The null hypothesis for each entry i,j
is that the corresponding value N_{ij}
or T_{ij}
is equal to the
expected value under RL or CSR.
See also (\insertCitedixon:1994,dixon:NNCTEco2002,ceyhan:eest-2010,ceyhan:jkss-posthoc-2017;textualnnspat) and the references therein.
cell.spec.ct(
ct,
covN,
type,
alternative = c("two.sided", "less", "greater"),
conf.level = 0.95
)
cell.spec(
dat,
lab,
type,
alternative = c("two.sided", "less", "greater"),
conf.level = 0.95,
...
)
ct |
A nearest neighbor contingency table, used in |
covN |
The |
type |
The type of the cell-specific test with no default.
Takes on values |
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 |
stat.names |
Name of the test statistics |
p.value |
The |
LCL , UCL |
Matrix of lower and upper confidence levels for the |
conf.int |
The confidence interval for the estimates, it is |
cnf.lvl |
Level of the upper and lower confidence limits of the entries, provided in |
estimate |
Estimates of the parameters, NNCT or TCT, i.e., matrix of the observed |
est.name , est.name2 |
Names of the estimates, both are same in this function |
null.value |
Matrix of hypothesized null values for the parameters which are expected values of the
the null |
null.name |
Name of the null values |
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
Zcell.nnct.ct
, Zcell.nnct
, Zcell.tct.ct
and Zcell.tct
n<-20 #or try sample(1:20,1)
Y<-matrix(runif(3*n),ncol=3)
ipd<-ipd.mat(Y)
cls<-sample(1:2,n,replace = TRUE) #or try cls<-rep(1:2,c(10,10))
ct<-nnct(ipd,cls)
W<-Wmat(ipd)
Qv<-Qvec(W)$q
Rv<-Rval(W)
varN<-var.nnct(ct,Qv,Rv)
covN<-cov.nnct(ct,varN,Qv,Rv)
type<-"IV" #"dixon" #try also "nnct", "I", "II", "III", and "IV"
cell.spec(Y,cls,type)
cell.spec(Y,cls,type,alt="g")
cell.spec.ct(ct,covN,type)
cell.spec.ct(ct,covN,type="II",alt="g")
cell.spec(Y,cls,type,method="max")
#cls as a factor
na<-floor(n/2); nb<-n-na
fcls<-rep(c("a","b"),c(na,nb))
cell.spec(Y,cls,type="I")
#############
n<-40
Y<-matrix(runif(3*n),ncol=3)
ipd<-ipd.mat(Y)
cls<-sample(1:4,n,replace = TRUE) #or try cls<-rep(1:2,c(10,10))
ct<-nnct(ipd,cls)
W<-Wmat(ipd)
Qv<-Qvec(W)$q
Rv<-Rval(W)
varN<-var.nnct(ct,Qv,Rv)
covN<-cov.nnct(ct,varN,Qv,Rv)
cell.spec(Y,cls,type)
cell.spec.ct(ct,covN,type)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.