Learn R Programming

nnspat (version 0.1.2)

EV.Tkinv: Expected Value of Cuzick and Edwards \(T_k^{inv}\) Test statistic

Description

This function computes the expected value of Cuzick and Edwards \(T_k^{inv}\) test statistic which is based on the sum of number of cases closer to each case than the k-th nearest control to the case.

The number of cases are denoted as \(n_1\) (denoted as n1 as an argument) and number of controls as \(n_0\) for both functions (denoted as n0 as an argument), to match the case-control class labeling, which is just the reverse of the labeling in cuzick:1990;textualnnspat.

See the function ceTkinv for the details of the \(T_k^{inv}\) test.

See (cuzick:1990;textualnnspat) and references therein.

Usage

EV.Tkinv(n1, n0, k)

Value

The expected value of Cuzick and Edwards \(T_k^{inv}\) test statistic for disease clustering

Arguments

n1, n0

The number of cases and controls

k

Integer specifying the number of the closest controls to subject \(i\).

Author

Elvan Ceyhan

References

See Also

ceTkinv, ceTrun, and EV.Trun

Examples

Run this code
n1<-20
n0<-25
k<-2 #try also 2, 3

EV.Tkinv(n1,n0,k)

EV.Tkinv(n1,n0,k=1)
EV.Trun(n1,n0)

Run the code above in your browser using DataLab