bpr_true: bpr_true

Description Usage Arguments Value References

View source: R/bpr_true.R

Description

Calculates a Bayesian posterior probability that a given test subject (e.g. a gene) has a given expected result (either negative or positive).

Usage

1
bpr_true(n, N, expected, theta_0, theta_1, p00, p11, p01, p10)

Arguments

n

An integer specifying the number of tests that produced a particular result (either negative or positive) for the focal subject.

N

Integer value giving the total number of repeated tests for the given subject.

expected

An integer value (either 0 or 1) indicating whether the expected result is negative (0) or positive (1).

theta_0

A real number (in range [0,1]) giving the prevalence of negative results for a set of test subjects.

theta_1

A real number (in range [0,1]) giving the prevalence of positive results for a set of test subjects.

p00

A real number (in range [0,1]) giving the probability that a test is negative given that the true result is negative (true-negative rate) for a set of test subjects.

p11

A real number (in range [0,1]) giving the probability that a test is positive given that the true result is positive (true-positive rate) for a set of test subjects.

p01

A real number (in range [0,1]) giving the probability that a test is negative given that the true result is positive (false-negative rate) for a set of test subjects.

p10

A real number (in range [0,1]) giving the probability that a test is positive given that the true result is negative (false-positive rate) for a set of test subjects.

Value

A real number giving the Bayesian posterior probability that the test subject has a given result.

References

Jakobsdottir and Weeks (2007). Estimating prevalence, false-positive rate, and false-negative rate with use of repeated testing when true responses are unknown. Am J Hum Genet 81:1111-1113.


alex-kalinka-cruk/perept documentation built on Jan. 11, 2020, 3:46 p.m.