BCPNN | R Documentation |
Applies the BCPNN to a collection of 2 x 2 tables of the form
event | not event | |
drug | a | c |
not drug | b | d
|
There are two versions of the BCPNN:
'original'
- The original version proposed by Bate et al. (1998)
'alternative'
- The BCPNN as proposed by Norén et al. (2006)
BCPNN(
a,
b,
c,
d,
alpha = NULL,
version = "original",
mc_estimate = FALSE,
mc_runs = 1000
)
a |
A vector with the counts of the upper left corner of the tables |
b |
A vector with the counts of the lower left corner of the tables |
c |
A vector with the counts of the upper right corner of the tables |
d |
A vector with the counts of the lower right corner of the tables |
alpha |
Value between |
version |
Version of the BCPNN used. Can either be |
mc_estimate |
The value is estimated using Monte Carlo runs (Default = |
mc_runs |
The number of Monte Carlo runs used to estimate the credible interval.
(Default: 1000). Only used when |
The implementation of this function is based on the implementation in the
PhViD
package.
The maximum aposteriori estimate of the information component (IC) or the lower endpoint of the approximate credible interval
Bate, A., Lindquist, M., Edwards, I. R., Olsson, S., Orre, R., Lansner, A., & De Freitas, R. M. (1998). A Bayesian neural network method for adverse drug reaction signal generation. European Journal of Clinical Pharmacology, 54(4), 315–321. http://doi.org/10.1007/s002280050466
Norén, G. N., Bate, A., Orre, R., & Edwards, I. R. (2006). Extending the methods used to screen the WHO drug safety database towards analysis of complex associations and improved accuracy for rare events. Statistics in Medicine, 25(21), 3740–3757. http://doi.org/10.1002/sim.2473
# get the tables
a <- srdata$tables$a
b <- srdata$tables$b
c <- srdata$tables$c
d <- srdata$tables$d
# Applying the original BCPNN:
BCPNN(a, b, c, d)
# [1] 0.349783103 -0.609077730 -0.168446711 -0.277981964 ...
# Getting the lower end point of the 95% confidence intervaL:
BCPNN(a, b, c, d, alpha = 0.05)
# [1] 0.280077253 -0.994960076 -0.293624528 -0.408661852 ...
# Using the alternative version:
BCPNN(a, b, c, d, version = 'alternative')
# [1] 0.350235800 -0.595807902 -0.166901050 -0.276387348 ...
# Getting the lower end points of the 95% confidence interval
# using the alternative version. The estimates are based on
# 10,000 Monte Carlo samples:
BCPNN(a, b, c, d, version = 'alternative',
alpha = 0.05, mc_estimate = TRUE, mc_runs = 10^4)
# [1] [1] 0.31621489 -0.92490130 -0.25601307 -0.37040303 ...
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.