Nt.def {nnspat}R Documentation

NtN_t Value (found with the definition formula)

Description

This function computes the NtN_t value which is required in the computation of the asymptotic variance of Cuzick and Edwards TkT_k test. Nt is defined on page 78 of (Cuzick and Edwards (1990)) as follows. Nt=ilaijaljN_t= \sum \sum_{i \ne l}\sum a_{ij} a_{lj} (i.e, number of triplets (i,j,l)(i,j,l) i,ji,j, and ll distinct so that jj is among kkNNs of ii and jj is among kkNNs of ll).

This function yields the same result as the asyvarTk and varTk functions with $Nt inserted at the end.

See (Cuzick and Edwards (1990)) for more details.

Usage

Nt.def(a)

Arguments

a

The A=(aij)A=(a_{ij}) matrix. The argument a is the AA matrix, obtained as output fromm aij.mat.

Value

Returns the NtN_t value standing for the number of triplets (i,j,l)(i,j,l) i,ji,j, and ll distinct so that jj is among kkNNs of ii and jj is among kkNNs of ll. See the description.

Author(s)

Elvan Ceyhan

References

Cuzick J, Edwards R (1990). “Spatial clustering for inhomogeneous populations (with discussion).” Journal of the Royal Statistical Society, Series B, 52, 73-104.

See Also

asyvarTk, varTk, and varTkaij

Examples

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)


[Package nnspat version 0.1.2 Index]