pnetfn: Calculate the probability of a specified net false negatives

Description Usage Arguments Details

View source: R/pnetfn.R

Description

The net false negatives are the number of false negatives minus the number of false positives. It is, in other words, the number of counts by which the observed positives are shifted downward, relative to the actual number of positive counts in the sample. This function calculates the probability that the net false negatives equal a specified value.

Usage

1
pnetfn(k, kpos, delta, phi, eta)

Arguments

k

Number of trials

kpos

Number of positive samples in the sample pool (before test error is applied)

delta

The number of net false negatives

phi

Sensitivity (true positive rate) of the test.

eta

Specificity (true negative rate) of the test.

Details

This probability can be calculated in terms of the probability mass function for the binomial distribution, ρ_{bn} (dbinom in R-lingo).

P(NFN = δ) = ∑_{j=0}^{k} ρ_{bn}(j, k, 1-φ) ρ_{bn}(j-δ, k, 1-η),

where φ is the sensitivity of the test and η is the specificity.

Note that this function is not vectorized.


rplzzz/sampEstimator documentation built on May 24, 2020, 4:35 a.m.