funs.covtct: Functions for Covariances of the Entries of the Types I, III...

Description Usage Arguments Value Author(s) References See Also Examples

Description

Four functions: cov.tctI, cov.tctIII, cov.tct3 and cov.tctIV.

These functions return the covariances between between entries in the TCT for the types I, III, and IV cell-specific tests in matrix form which is of dimension k^2 \times k^2. The covariance matrix entries are cov(T_{ij},T_{kl}) when T_{ij} values are by default corresponding to the row-wise vectorization of TCT. The argument CovN must be the covariance between N_{ij} values which are obtained from the NNCT by row-wise vectorization. The functions cov.tctIII and cov.tct3 are equivalent. These covariances are valid under RL or conditional on Q and R under CSR.

See also (\insertCiteceyhan:jkss-posthoc-2017;textualnnspat).

Usage

1
2
3
4
5
6
7
cov.tctI(ct, CovN)

cov.tctIII(ct, CovN)

cov.tct3(ct, CovN)

cov.tctIV(ct, CovN)

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.

Value

Each of these functions returns a k^2 \times k^2 covariance matrix, whose entries are the covariances of the entries in the TCTs for the corresponding type I-IV cell-specific test. The row and column names are inherited from ct.

Author(s)

Elvan Ceyhan

References

\insertAllCited

See Also

cov.tct and cov.nnct

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
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)

cov.tctI(ct,covN)
cov.tctIII(ct,covN)
cov.tctIV(ct,covN)

nnspat documentation built on May 10, 2021, 9:06 a.m.