Learn R Programming

nnspat (version 0.1.2)

funsExpTrun: Expected Value for Cuzick and Edwards \(T_{run}\) Test statistic

Description

Two functions: EV.Trun and EV.Trun.alt.

Both functions compute the expected value of Cuzick and Edwards \(T_{run}\) test statistic based on the number of consecutive cases from the cases in the data under RL or CSR independence.

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.

The function EV.Trun.alt uses a loop and takes slightly longer than the function EV.Trun, hence EV.Trun is used in other functions.

See also (cuzick:1990;textualnnspat).

Usage

EV.Trun(n1, n0)

EV.Trun.alt(n1, n0)

Value

The expected value of Cuzick and Edwards \(T_{run}\) test statistic for disease clustering

Arguments

n1, n0

The number of cases and controls used as arguments for both functions.

Author

Elvan Ceyhan

References

See Also

ceTrun and EV.Tk

Examples

Run this code
n1<-20
n0<-25

EV.Trun(n1,n0)

Run the code above in your browser using DataLab