Nt.def | R Documentation |
This function computes the N_t value which is required in the computation of the asymptotic variance of Cuzick and Edwards T_k test. Nt is defined on page 78 of (\insertCitecuzick:1990;textualnnspat) as follows. N_t= ∑ ∑_{i \ne l}∑ a_{ij} a_{lj} (i.e, number of triplets (i,j,l) i,j, and l distinct so that j is among kNNs of i and j is among kNNs of l).
This function yields the same result as the asyvarTk
and varTk
functions with $Nt
inserted at the
end.
See (\insertCitecuzick:1990;textualnnspat) for more details.
Nt.def(a)
a |
The A=(a_{ij}) matrix. The argument |
Returns the N_t value standing for the number of triplets (i,j,l) i,j, and l distinct so that j is among kNNs of i and j is among kNNs of l. See the description.
Elvan Ceyhan
asyvarTk
, varTk
, and varTkaij
n<-20 #or try sample(1:20,1) Y<-matrix(runif(3*n),ncol=3) k<-2 #try also 2,3 a<-aij.mat(Y,k) Nt.def(a)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.