senspec: S3 methods to estimate diagnosis performance of an afmodel

Description Usage Arguments Value See Also Examples

View source: R/sens_spec_fmodel.R

Description

Estimate sensitivity, specificity, positive predicted value and negative predicted value negative predictive value from an afmodel. The estimated "true" negative and "true" positive are estimated using the estimated overall attributable fraction and the predictive positive value associated with each cut-off point as described by Smith, T., Schellenberg, J.A., Hayes, R., 1994. Attributable fraction estimates and case definitions for malaria in endemic areas. Stat Med 13, 2345–2358.

Usage

1
2
3
4
5
6
7
senspec(object, ...)

## Default S3 method:
senspec(object, ...)

## S3 method for class 'afmodel'
senspec(object, cutoff, ...)

Arguments

object

with the data to calculate the sensitivity and specificity

...

other parameters for the implementing functions

cutoff

vector of cut-off points to make the estimations

Value

a matrix with the columns sensitivity and specificity, ppv (positive predicted value) and npv (negative predicted value)

No return value. Raise an error.

a matrix with the columns sensitivity and specificity, ppv (positive predicted value) and npv (negative predicted value)

See Also

logitexp

Examples

1
2
3
4
5
6
7
{
# Get the sample data
head(malaria_df1)
fit <- logitexp(malaria_df1$fever, malaria_df1$density)
fit
senspec(fit,  c(1,100,500,1000,2000,4000,8000,16000, 32000,54000,100000))
}

afdx documentation built on May 25, 2021, 5:09 p.m.