pk: Probability of 'k' items selected from the class with size...

View source: R/NNCTFunctions.R

pkR 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 \insertCitecuzick:1990;textualnnspat.

See (\insertCitecuzick:1990;textualnnspat) 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

\insertAllCited

See Also

p11 and p12 etc.

asyvarTk, varTk, and varTkaij


nnspat documentation built on May 29, 2024, 10:03 a.m.