| EV.Tcomb {nnspat} | R Documentation |
Expected Value for Cuzick & Edwards T_{comb} Test Statistic
Description
This function computes the expected value of Cuzick & Edwards T_{comb} test statistic in disease clustering,
where T_{comb} is a linear combination of some T_k tests.
The argument, n_1, is the number of cases (denoted as n1 as an argument).
The number of cases is denoted as n_1 to match the case-control class labeling,
which is just the reverse of the labeling in Cuzick and Edwards (1990).
The argument klist is the vector of integers specifying the indices of the T_k values used
in obtaining the T_{comb}.
The argument sig is the covariance matrix of the vector of T_k values used in Tcomb, and can be computed
via the the covTcomb function.
See page 87 of (Cuzick and Edwards (1990)) for more details.
Usage
EV.Tcomb(n1, n, klist, sig)
Arguments
n1 |
Number of cases |
n |
A positive integer representing the number of points in the data set |
klist |
|
sig |
The covariance matrix of the vector of |
Value
Returns the expected value of the T_{comb} test statistic
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
Examples
n<-20 #or try sample(1:20,1) #try also n<-50, 100
Y<-matrix(runif(3*n),ncol=3)
cls<-sample(0:1,n,replace = TRUE) #or try cls<-rep(0:1,c(10,10))
n1<-sum(cls==1)
kl<-sample(1:5,3) #try also sample(1:5,2)
kl
sig<-covTcomb(Y,n1,kl)
EV.Tcomb(n1,n,kl,sig)