mixprob: Marginal probability as a function of sensitivity,...

Description Usage Arguments Value Note Author(s) References See Also Examples

View source: R/mixprob.R

Description

The function returns the marginal probability values based on sensitivity and specificity of at least three testing methods and prevalence of true positives.

Usage

1
mixprob(sens, spec, p)

Arguments

sens

A vector of K sensitivity values for K different testing methods.

spec

A vector of K specificity values for K different testing methods, with the order of the methods same as in sens.

p

Prevalence of true positives.

Value

A named vector of probabilities for the categories of testing results. The naming is from '00...0' to '11...1', with length K for the K methods, 0-1 pattern corresponds to the test results, e.g., 010 = results from 3 tests are negative, positive, and negative, respectively. The order is the same as in input sens and spec.

Note

This is an internal function for likelihood calculation.

Author(s)

Xia Shen, Yudi Pawitan

References

Yang Z, Xu W, Zhai R, Li T, Ning Z, Pawitan Y, Shen X (2020). Triangulation of analysis strategies links complex traits to specific tissues and cell types. Submitted.

See Also

loglik

Examples

1
2
3
4
5
6
7
## Not run: 
mixprob(sens = c(.5,.6,.7), spec = c(.5,.4,.3), p = .5)

#  000  100  010  110  001  101  011  111
# 0.06 0.06 0.09 0.09 0.14 0.14 0.21 0.21

## End(Not run)

xiashen/triangulation documentation built on Aug. 30, 2020, 2:13 a.m.