pk {nnspat}R Documentation

Probability of k items selected from the class with size n_1

Description

Returns the ratio n_1(n_1-1) \cdots (n_1-(k-1))/(n(n-1) \cdots (n-(k-1)), which is the probability that the k selected objects are from class 1 with size n_1 (denoted as n1 as an argument) and the total data size is n. This probability is valid under RL or CSR.

This function computes the p_k value which is required in the computation of the variance of Cuzick and Edwards T_k test. p_k is defined as the ratio n_1(n_1-1)\cdots (n_1-(k-1))/(n(n-1)\cdots (n-(k-1)).

The argument, n_1, 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 and Edwards (1990).

See (Cuzick and Edwards (1990)) for more details.

Usage

pk(n, n1, k)

pk(n, n1, k)

Arguments

n

A positive integer representing the number of points in the data set

n1

Number of cases

k

Integer specifying the number of NNs (of subject i)

Value

Returns the probability of k items selected from n items are from the class of interest (i.e., from the class whose size is n_1)

Returns the p_k value. See the description.

Author(s)

Elvan Ceyhan

References

Cuzick J, Edwards R (1990). “Spatial clustering for inhomogeneous populations (with discussion).” Journal of the Royal Statistical Society, Series B, 52, 73-104.

See Also

p11 and p12 etc.

asyvarTk, varTk, and varTkaij


[Package nnspat version 0.1.2 Index]