var.tct {nnspat} | R Documentation |
Variances of Entries in a TCT
Description
Returns the variances of T_{ij}
values
for i,j=1,\ldots,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.
See also (Ceyhan (2010, 2017)).
Usage
var.tct(ct, covN, type = "III")
Arguments
ct |
A nearest neighbor contingency table |
covN |
The |
type |
The type of the cell-specific test, default= |
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
.
Author(s)
Elvan Ceyhan
References
Ceyhan E (2010).
“New Tests of Spatial Segregation Based on Nearest Neighbor Contingency Tables.”
Scandinavian Journal of Statistics, 37(1), 147-165.
Ceyhan E (2017).
“Cell-Specific and Post-hoc Spatial Clustering Tests Based on Nearest Neighbor Contingency Tables.”
Journal of the Korean Statistical Society, 46(2), 219-245.
See Also
var.nnct
, var.tctI
,
var.tctIII
, var.tctIV
,
and cov.tct
Examples
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)