Two functions: varTrun
and varTrun.sim
.
The function varTrun
computes the (finite sample) variance of Cuzick and Edwards \(T_{run}\) test statistic
which is based on the number of consecutive cases from the cases in the data under RL or CSR independence.
And the function varTrun.sim
estimates this variance based on simulations under the RL hypothesis.
The only common argument for both functions is dat
, the data set used in the functions.
\(n_1\) is an argument for varTrun
and is the number of cases (denoted as n1
as an argument).
The number of cases are denoted as \(n_1\) and number of controls as \(n_0\) in this function
to match the case-control class labeling,
which is just the reverse of the labeling in cuzick:1990;textualnnspat.
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. The argument Nsim
represents the number of resamplings (without replacement) in the
RL scheme, with default being 1000
. cc.lab
, case.lab
and Nsim
are arguments for varTrun.sim
only.
The function varTrun
might take a very long time when data size is large (even larger than 50),
hence the need for the varTrun.sim
function.
See (cuzick:1990;textualnnspat).