View source: R/NNCTFunctions.r
Tval | R Documentation |
Returns the T value, which is the number of triplets (z_i, z_j, z_k) with "NN(z_i) = NN(z_j) = z_k and NN(z_k) = z_j" where NN(\cdot) is the nearest neighbor function. Note that in the NN digraph, T+R is the sum of the indegrees of the points in the reflexive pairs.
This quantity (together with Q and R) is used in computing the variances and covariances of the entries of the reflexivity contingency table. See (\insertCiteceyhan:NNreflexivity2017;textualnnspat) for further details.
Tval(W, R)
W |
The incidence matrix, W, for the NN digraph |
R |
The number of reflexive NNs (i.e., twice the number of reflexive NN pairs) |
Returns the T value. See the description above for the details of this quantity.
Elvan Ceyhan
Qval
, Qvec
, sharedNN
and Rval
#3D data points n<-10 Y<-matrix(runif(3*n),ncol=3) ipd<-ipd.mat(Y) W<-Wmat(ipd) R<-Rval(W) Tval(W,R) #1D data points X<-as.matrix(runif(15)) # need to be entered as a matrix with one column #(i.e., a column vector), hence X<-runif(5) would not work ipd<-ipd.mat(X) W<-Wmat(ipd) R<-Rval(W) Tval(W,R) #with ties=TRUE in the data Y<-matrix(round(runif(30)*10),ncol=3) ipd<-ipd.mat(Y) W<-Wmat(ipd,ties=TRUE) R<-Rval(W) Tval(W,R)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.