pfree.calc: Probability of freedom over time

Description Usage Arguments Value Examples

View source: R/freedom_functions_1.R

Description

Calculates the probability (confidence) of disease freedom for given prior, sep and p.intro over 1 or more time periods

Usage

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

Arguments

sep

population sensitivity for each time period (vector)

p.intro

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

prior

prior probability of freedom before surveillance (scalar)

Value

data.frame with columns for sep, p.intro, discounted prior, probability of freedom, equilibrium probability of freedom and equilibrium prior

Examples

1
2
3
4
5
# examples for pfree.calc
pfree.calc(0.8, 0.01, 0.5)
pfree.calc(rep(0.6,24), 0.01, 0.5)
pfree.calc(runif(10, 0.4, 0.6), 0.01, 0.5)
pfree.calc(runif(10, 0.4, 0.6), runif(10, 0.005, 0.015), 0.5)


RSurveillance documentation built on May 19, 2017, 10:21 p.m.
Search within the RSurveillance package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.