Ntkl | R Documentation |
N_{tkl}
ValueThis function computes the N_{tkl}
value which is required in the computation of the exact and asymptotic variance
of Cuzick and Edwards T_{comb}
test, which is a linear combination of some T_k
tests.
N_{tkl}
is defined on page 80 of (\insertCitecuzick:1990;textualnnspat) as follows.
Let a_{ij}(k)
be 1 if j
is a k
NN of i
and zero otherwise and
N_t(k,l) = \sum \sum_{i \ne m}\sum a_{ij}(k) a_{mj}(l)
.
The logical argument nonzero.mat
(default=TRUE
) is for using the A
matrix if FALSE
or just the matrix of nonzero
locations in the A
matrix (if TRUE
) in the computations.
See (\insertCitecuzick:1990;textualnnspat) for more details.
Ntkl(dat, k, l, nonzero.mat = TRUE, ...)
dat |
The data set in one or higher dimensions, each row corresponds to a data point. |
k , l |
Integers specifying the number of NNs (of subjects |
nonzero.mat |
A logical argument (default is |
... |
are for further arguments, such as |
Returns the N_{tkl}
value. See the description.
Elvan Ceyhan
asycovTkTl
, and covTkTl
n<-20 #or try sample(1:20,1)
Y<-matrix(runif(3*n),ncol=3)
k<-1 #try also 2,3 or sample(1:5,1)
l<-1 #try also 2,3 or sample(1:5,1)
c(k,l)
Ntkl(Y,k,l)
Ntkl(Y,k,l,nonzero.mat = FALSE)
Ntkl(Y,k,l,method="max")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.