| funsC_MI_II {nnspat} | R Documentation | 
Correction Matrices for the Covariance Matrix of NNCT entries
Description
Two functions: correct.cf1 and correct.cf1.
Each function yields matrices which are used in obtaining covariance matrices of T_{ij} values for 
types I and II tests from the usual Chi-Square test of contingency tables (i.e., Pielou's test) applied
on NNCTs.
The output matrices are to be term-by-term multiplied with the covariance matrix of 
the entries of NNCT. See Sections 3.1 and 3.2 in 
(Ceyhan (2010))
or
Sections 3.5.1 and 3.5.2 in 
(Ceyhan (2008)) for more details.
Usage
correct.cf1(ct)
correct.cf2(ct)
Arguments
| ct | A nearest neighbor contingency table | 
Value
Both functions return a correction matrix which is to be multiplied with the covariance matrix of entries of the NNCT so as to obtain types I and II overall tests from Pielou's test of segregation. See the description above for further detail.
Author(s)
Elvan Ceyhan
References
Ceyhan E (2008).
“New Tests for Spatial Segregation Based on Nearest Neighbor Contingency Tables.”
https://arxiv.org/abs/0808.1409v3 [stat.ME].
Technical Report # KU-EC-08-6, KoƧ University, Istanbul, Turkey.
 Ceyhan E (2010).
“New Tests of Spatial Segregation Based on Nearest Neighbor Contingency Tables.”
Scandinavian Journal of Statistics, 37(1), 147-165.
See Also
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)
#correction type 1
CM1<-correct.cf1(ct)
CovN.cf1<-covN*CM1
#correction type 2
CM2<-correct.cf2(ct)
CovN.cf2<-covN*CM2
covN
CovN.cf1
CovN.cf2