prior_fr {freedom}R Documentation

prior_fr

Description

Calculate the prior probability of freedom (year = k)

Usage

prior_fr(post_fr, intro)

Arguments

post_fr

The posterior probability of freedom (year = k-1)

intro

The annual probability of introduction

Details

In order to calculate the posterior probability of freedom (year = k) , the prior probability of freedom (year = k) is first calculated from the posterior probability of freedom (year = k-1) from the previous year and the annual probability that the disease is introduced into the population.

Value

A vector. The prior probability of freedom (year = k)

Examples

## Calculate the posterior probability of freedom after applying a
## sensitivity to a prior probability of freedom:
post_pf <- post_fr(0.5, 0.4)
## Then discount the probability of introduction (0.05) from the
## posterior probability of freedom to calculate the subsequent
## prior probability of freedom for the next time step:
prior_pf <- prior_fr(post_pf, 0.05)

[Package freedom version 1.0.1 Index]