ceTrun | R Documentation |
This function computes Cuzick and Edwards T_{run} test statistic based on the sum of the number of successive cases from each cases until a control is encountered in the data for detecting rare large clusters.
T_{run} test statistic is defined as T_{run}=∑_{i=1}^n δ_i d_i^r where δ_i=1 if z_i is a case, and 0 if z_i is a control and d_i^r is the number successive cases encountered beginning at z_i until a control is encountered.
The argument cc.lab
is case-control label, 1 for case, 0 for control, if the argument case.lab
is NULL
,
then cc.lab
should be provided in this fashion, if case.lab
is provided, the labels are converted to 0's and 1's
accordingly.
See also (\insertCitecuzick:1990;textualnnspat) and the references therein.
ceTrun(dat, cc.lab, case.lab = NULL, ...)
dat |
The data set in one or higher dimensions, each row corresponds to a data point. |
cc.lab |
Case-control labels, 1 for case, 0 for control |
case.lab |
The label used for cases in the |
... |
are for further arguments, such as |
A list
with two elements
Trun |
Cuzick and Edwards T_{run} test statistic for disease clustering |
run.vec |
The |
Elvan Ceyhan
ceTk
, Tcomb
and ceTkinv
n<-20 #or try sample(1:20,1) Y<-matrix(runif(3*n),ncol=3) cls<-sample(0:1,n,replace = TRUE) #or try cls<-rep(0:1,c(10,10)) ceTrun(Y,cls) ceTrun(Y,cls,method="max") ceTrun(Y,cls+1,case.lab = 2) #cls as a factor na<-floor(n/2); nb<-n-na fcls<-rep(c("a","b"),c(na,nb)) ceTrun(Y,fcls,case.lab="a") #try also ceTrun(Y,fcls) ############# n<-40 Y<-matrix(runif(3*n),ncol=3) cls<-sample(1:4,n,replace = TRUE) #here ceTrun(Y,cls) #gives an error message
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.