Learn R Programming

petersenlab (version 1.1.0)

posttestOdds: Posttest Odds & Probability.

Description

Estimate posttest odds and posttest probability.

Usage

posttestOdds(
  TP,
  TN,
  FP,
  FN,
  pretestProb = NULL,
  SN = NULL,
  SP = NULL,
  likelihoodRatio = NULL
)

posttestProbability( TP, TN, FP, FN, pretestProb = NULL, SN = NULL, SP = NULL, likelihoodRatio = NULL )

Value

The requested posttest odds or pottest probability.

Arguments

TP

Number of true positive cases.

TN

Number of true negative cases.

FP

Number of false positive cases.

FN

Number of false negative cases.

pretestProb

Pretest probability (prevalence/base rate/prior probability) of characteristic, as a number between 0 and 1.

SN

Sensitivity of the test at a given cut point, as a number between 0 and 1.

SP

Specificity of the test at a given cut point, as a number between 0 and 1.

likelihoodRatio

Likelihood ratio of the test at a given cut point.

Details

Estimates posttest odds or posttest probability.

See Also

Other accuracy: accuracyAtCutoff(), accuracyAtEachCutoff(), accuracyOverall(), nomogrammer(), optimalCutoff()

Examples

Run this code
posttestOdds(
  TP = 26,
  TN = 56,
  FP = 14,
  FN = 14)

posttestOdds(
  pretestProb = 0.3636364,
  SN = 0.65,
  SP = 0.80)

posttestOdds(
  pretestProb = 0.3636364,
  likelihoodRatio = 3.25)

posttestProbability(
  TP = 26,
  TN = 56,
  FP = 14,
  FN = 14)

posttestProbability(
  pretestProb = 0.3636364,
  SN = 0.65,
  SP = 0.80)

posttestProbability(
  pretestProb = 0.3636364,
  likelihoodRatio = 3.25)

Run the code above in your browser using DataLab