triangulate: Maximum likelihood estimation of sensitivity, specificity,...

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

View source: R/triangulate.R

Description

The function estimates sensitivity, specificity, and prevalence parameters, for at least three different methods, without a gold standard.

Usage

1
2
3
4
5
6
7
triangulate(
  counts,
  ntest,
  method = "Nelder-Mead",
  B = 0,
  start = c(rep(0.5, ntest * 2), 0.5)
)

Arguments

counts

A summary counts vector for the contingencies of each combination of test results, must be named according to the 0-1 pattern, e.g., 010 = results from 3 tests are negative, positive, and negative, respectively. names(ny) maybe incomplete and has arbitrary order.

ntest

An integer of the number of tests performed by each method, i.e., sample size for evaluating the likelihood.

method

The optimization method to be used, can be one of "Nelder-Mead", "BFGS", "CG", "L-BFGS-B", "SANN", or "Brent". See Note. e.g., 010 = results from 3 tests are negative, positive, and negative, respectively. names(ny) maybe incomplete and has arbitrary order.

B

An integer for the number of bootstrap samples, default 0 means no bootstrap estimation for standard errors.

start

A vector of 2K + 1 parameter starting values, corresponding to K sensitivity values, K specificity values, and prevalence of true positives, respectively. Default: 0.5 for all parameters.

Value

A list of parameter estimates. If B > 0, the list also contains the standard errors obtained via bootstrap.

Note

Please refer to the documentation of the optim function for method details.

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

combined.fdr

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 

ny <- c(1051, 179, 1028, 154, 1040, 159, 981, 208) 
names(ny) <- c('000', '001', '010', '011', '100', '101', '110', '111') 
ny
#  000  001  010  011  100  101  110  111
# 1051  179 1028  154 1040  159  981  208

triangulate(counts = ny, ntest = 3) # no standard error

triangulate(counts = ny, ntest = 3, B = 10) 


## End(Not run)

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