pfree.1: Probability of freedom for single time period

Description Usage Arguments Value Examples

View source: R/freedom_functions_1.R

Description

Calculates the posterior probability (confidence) of disease freedom (negative predictive value) for a single time period

Usage

1
pfree.1(sep, p.intro, prior = 0.5)

Arguments

sep

population sensitivity for time period (scalar or vector)

p.intro

probability of introduction for time period (scalar or vector of same length as sep)

prior

prior probability of freedom before surveillance (scalar or vector of same length as sep)

Value

data.frame with columns for sep, p.intro, discounted prior, pfree, pfree.equ and prior.equ

Examples

1
2
3
4
5
# examples for pfree.1
pfree.1(0.8, 0.01, 0.5)
pfree.1(0.6, c(0.001, 0.005, 0.01, 0.02, 0.05), 0.5)
pfree.1(runif(10, 0.4, 0.6), 0.01, 0.5)
pfree.1(runif(10, 0.4, 0.6), runif(10, 0.005, 0.015), 0.5)

RSurveillance documentation built on July 2, 2020, 2:33 a.m.