qnpos: Find a quantile of the distribution of positive measurements

Description Usage Arguments Details

View source: R/pnetfn.R

Description

For the probability density defined in pnpos, find a quantile. The quantile is defined as the smallest k_{pos} such that ∑_{i=0}^{k_{pos}} dnpos(k_{pos}) ≥ p, for some specified p.

Usage

1
qnpos(p, k, popprev, Npop, phi, eta)

Arguments

p

Probability of the quantile being sought

k

Sample size

popprev

Population prevalence

Npop

Total population

phi

Test sensitivity

eta

Test specificity

Details

Since we don't have a good way to calculate the sum in the definition, other than by iterating over the terms, we don't bother with a secant search or anything like that; we just keep summing until we get there.


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