# var.tct: Variances of Entries in a TCT In nnspat: Nearest Neighbor Methods for Spatial Patterns

## Description

Returns the variances of T_{ij} values for i,j=1,…,k in the TCT in matrix form which is of the same dimension as TCT for types I-IV tests. The argument covN must be the covariance between N_{ij} values which are obtained from the NNCT by row-wise vectorization. type determines the type of the test for which variances are to be computed, with default="III". These variances are valid under RL or conditional on Q and R under CSR.

## Usage

 1 var.tct(ct, covN, type = "III") 

## Arguments

 ct A nearest neighbor contingency table covN The k^2 \times k^2 covariance matrix of row-wise vectorized cell counts of NNCT, ct. type The type of the cell-specific test, default="III". Takes on values "I"-"IV" (or equivalently 1-4, respectively.

## Value

A matrix of same dimension as, ct, whose entries are the variances of the entries in the TCT for the corresponding type of cell-specific test. The row and column names are inherited from ct.

Elvan Ceyhan

## References

\insertAllCited

var.nnct, var.tctI, var.tctIII, var.tctIV and cov.tct
  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 32 33 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) var.tct(ct,covN,"I") var.tct(ct,covN,2) var.tct(ct,covN,"III") var.tct(ct,covN,"IV") ############# 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) var.tct(ct,covN,"I") var.tct(ct,covN,2)