funsZcell.tct | R Documentation |
Two functions: Zcell.tct.ct
and Zcell.tct
.
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 types I-IV TCT, T_{ij}, from their 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 \insertCiteceyhan:jkss-posthoc-2017;textualnnspat.
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 T_{ij} values and also names of the test statistics, estimates, null values and the method and the data set used.
The null hypothesis for each entry i,j is that the corresponding value T_{ij} is equal to the expected value under RL or CSR, see \insertCiteceyhan:jkss-posthoc-2017;textualnnspat for more detail.
See also (\insertCiteceyhan:jkss-posthoc-2017;textualnnspat) and references therein.
Zcell.tct.ct( ct, covN, type = "III", alternative = c("two.sided", "less", "greater"), conf.level = 0.95 ) Zcell.tct( dat, lab, type = "III", alternative = c("two.sided", "less", "greater"), conf.level = 0.95, ... )
ct |
A nearest neighbor contingency table, used in |
covN |
The k^2 \times k^2 covariance matrix of row-wise vectorized cell counts of NNCT, |
type |
The type of the cell-specific test, default= |
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 T_{ij} values at the given confidence
level |
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, i.e., matrix of the observed T_{ij} values which is the TCT |
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 T_{ij} values in the TCT. |
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
and Zcell.nnct
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<-"I" #try also "II", "III", and "IV" Zcell.tct(Y,cls,type) Zcell.tct(Y,cls,type,alt="g") Zcell.tct(Y,cls,type,method="max") Zcell.tct.ct(ct,covN) Zcell.tct.ct(ct,covN,type) Zcell.tct.ct(ct,covN,type,alt="g") #cls as a factor na<-floor(n/2); nb<-n-na fcls<-rep(c("a","b"),c(na,nb)) Zcell.tct(Y,cls,type) ############# 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) Zcell.tct(Y,cls,type) Zcell.tct.ct(ct,covN,type)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.