Description Usage Arguments Details Value References Examples
View source: R/posterior_probability.R
Computes the posterior probability of disease given prevalence (prior probability) and positive or negative likelihood ratio of a test. Furthermore it is possible to give out the posterior odds.
| 1 | posterior_probability(prevalence,lrpos=-1, lrneg=-1 ,posterior_odds=FALSE)
 | 
| prevalence | The prevalence of a disease (=prior_odds). | 
| lrpos | The positive likelihood ratio (only displayed on the output window if a values >= 0 has been entered). | 
| lrneg | The negative likelihood ratio (only displayed on the output window if a values >= 0 has been entered). | 
| posterior_odds | If TRUE the posterior odds will be displayed on the output window. Default is FALSE. | 
posterior\_odds\_of\_disease = {prior\_odds} * {pos\_likelihood\_ratio}
prior\_odds = \frac{prior\_probability}{1-prior\_probability}
posterior\_probability\_of\_disease = \frac{posterior\_odds}{1+posterior_odds}
| posterior_probability_pos | Probability of disease given test is positive | 
| posterior_probability_neg | Probability of no disease given test is negative | 
| posterior_odds_pos | Posterior odds of test positive | 
| posterior_odds_neg | Posterior odds of test negative | 
Petrie A, Sabin C (2005). Medical statistics at a glance (2nd ed). Wiley-Blackwell. Oxford.
| 1 2 3 4 5 6 7 8 9 10 11 | ##Prevalence is 0.5 and the positive likelihood ratio is 3:
posterior_probability(0.5, lrpos=3)
#The probability of disease given test is positive is 0.75.
##Prevalence is 0.5 and the negative likelihood ratio is 0.5:
posterior_probability(0.5, lrneg=0.5, posterior_odds=TRUE)
#The probability of no disease is 0.66 given test is negative and the 
#corresponding posterior odds is 0.5.
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.