EV.Tcomb | R Documentation |
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 \insertCitecuzick:1990;textualnnspat.
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 (\insertCitecuzick:1990;textualnnspat) for more details.
EV.Tcomb(n1, n, klist, sig)
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 T_k values used in |
Returns the expected value of the T_{comb} test statistic
Elvan Ceyhan
Tcomb
, and ZTcomb
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.