ppa | R Documentation |
Estimate the probability of your hypothesis being true, given the observed p-value and a prior probability of the hypothesis being true.
ppa(p = 0.05, prior = 0.5, BF = NULL, quiet = TRUE)
p |
p-value you want to test [p<0.367], or 'bayes factor' |
prior |
prior odds for the hypothesis (Ha) being tested |
BF |
logical, set to TRUE if you have entered a bayes factor as 'p' rather than a p-value |
quiet |
logical, whether to display verbose information for calculation |
prints calculations, then returns the posterior probability of association given the observed p-value under the specified prior
Equations 1, 2 from http://www.readcube.com/articles/10.1038/nrg2615 Equations 2, 3 from http://www.tandfonline.com/doi/pdf/10.1198/000313001300339950
ps <- rep(c(.05,.01),3) prs <- rep(c(.05,.50,.90),each=2) mapply(ps,prs,FUN=ppa) # replicate Nuzzo 2014 table # try with bayes factors ppa(BF=3,prior=.9) ppa(BF=10,prior=.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.