n.pfree {RSurveillance}R Documentation

Sample size to achieve desired (posterior) probability of freedom

Description

Calculates the sample size required to achieve a given value for probability of disease freedom

Usage

n.pfree(pfree, prior, p.intro, pstar, se, N = NA)

Arguments

pfree

desired probability of freedom (scalar or vector)

prior

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

p.intro

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

pstar

design prevalence (scalar or vector of same length as pfree)

se

unit sensitivity (scalar or vector of same length as pfree)

N

population size (scalar or vector of same length as pfree)

Value

a list of 3 elements, the first a vector of sample sizes and the second a corresponding vector of population sensitivity values and the third a vector of adjusted priors

Examples

# examples for n.pfree
n.pfree(0.95, 0.5, 0.01, 0.05, 0.9)
n.pfree(0.95, 0.5, 0.01, 0.05, 0.9, N=300)
n.pfree(pfree = c(0.9, 0.95, 0.98, 0.99), prior = 0.7, 0.01, 0.01, 0.8, 1000)
n.pfree(0.95, 0.7, 0.01, 0.1, 0.96)

[Package RSurveillance version 0.2.1 Index]