lr: Likelihood ratios given sensitivity and specificity of a test

Description Usage Arguments Details Value References Examples

View source: R/lr.R

Description

Computes positive and negative likelihood ratios (LRs) given sensitivity and specificity of a test. LRs can be used to calculate the probability of disease after a positive or negative test.

Usage

1
lr(se, sp)

Arguments

se

sensitivity of a test (values between 0 and 1)

sp

specificity of a test (values between 0 and 1)

Details

LRs are calculated as follows:

LRpos = \frac {sensitivity}{1-specificity}

LRneg = \frac {1-sensitivity}{specificity}

Value

lrpos

the positive likelihood ratio

lrneg

the negative likelihood ratio

References

Fletcher R, Fletcher S (2005). Clinical epidemiology: the essentials (4th ed). Lippincott Williams & Wilkins. Philadelphia.

Examples

1
2
3
lr(se=0.9, sp=0.7)

#The  positive likelihood ratio is 3 and the egative likelihood ratio is 0.14

Example output

$lrpos
[1] 3

$lrneg
[1] 0.1428571

GWG documentation built on May 2, 2019, 4:43 a.m.