# cellsTij: Entries for the Types I-IV cell-specific tests In nnspat: Nearest Neighbor Methods for Spatial Patterns

## Description

Returns a `matrix` of same dimension as, `ct`, whose entries are the values of the Types I-IV cell-specific test statistics, T^I_{ij}-T^{IV}_{ij}. The row and column names are inherited from `ct`. The type argument specifies the type of the cell-specific test among the types I-IV tests. Equivalent to the function `tct` in this package.

See also (\insertCiteceyhan:jkss-posthoc-2017;textualnnspat) and the references therein.

## Usage

 `1` ```cellsTij(ct, type = "III") ```

## Arguments

 `ct` A nearest neighbor contingency table `type` The type of the cell-specific test, default=`"III"`. Takes on values `"I"`-`"IV"` (or equivalently `1-4`, respectively.

## Value

A `matrix` of the values of Type I-IV cell-specific tests

Elvan Ceyhan

## References

\insertAllCited

`tct` and `nnct`
 ``` 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31``` ```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) ct type.lab<-c("I","II","III","IV") for (i in 1:4) { print(paste("T_ij values for cell specific tests for type",type.lab[i])) print(cellsTij(ct,i)) } cellsTij(ct,"II") #cls as a factor na<-floor(n/2); nb<-n-na fcls<-rep(c("a","b"),c(na,nb)) ct<-nnct(ipd,fcls) cellsTij(ct,2) ############# 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) cellsTij(ct,2) ct<-matrix(c(0,10,5,5),ncol=2) cellsTij(ct,2) ```