View source: R/PosteriorModeNPP.R
ModeDeltaMultinomialNPP | R Documentation |
The function returns the posterior mode of the power parameter \delta
in multinomial population.
It calculates the log of the posterior density (up to a normalizing constant), and conduct a grid search
to find the approximate mode.
ModeDeltaMultinomialNPP(Data.Cur, Data.Hist, CompStat = list(n0 = NULL, n1 = NULL),
npoints = 1000, prior = list(theta.dir.alpha = c(0.5, 0.5, 0.5),
delta.alpha = 1, delta.beta = 1))
Data.Cur |
a non-negative integer vector of |
Data.Hist |
a non-negative integer vector of |
CompStat |
a list of two elements that represents the
"compatibility(sufficient) statistics" for
|
npoints |
is a non-negative integer scalar indicating number of points on a regular spaced grid between [0, 1], where we calculate the log of the posterior and search for the mode. |
prior |
a list of the hyperparameters in the prior for both
|
See example.
A numeric value between 0 and 1.
Zifei Han hanzifei1@gmail.com
Ibrahim, J.G., Chen, M.-H., Gwon, Y. and Chen, F. (2015). The Power Prior: Theory and Applications. Statistics in Medicine 34:3724-3749.
Duan, Y., Ye, K. and Smith, E.P. (2006). Evaluating Water Quality: Using Power Priors to Incorporate Historical Information. Environmetrics 17:95-106.
ModeDeltaBerNPP
;
ModeDeltaNormalNPP
;
ModeDeltaPoisNPP
ModeDeltaMultinomialNPP(CompStat = list(n0 = c(25,25,25,25), n1 = c(25,25,25,25)),
prior = list(theta.dir.alpha = c(0.5, 0.5, 0.5, 0.5),
delta.alpha = 1, delta.beta = 1))
ModeDeltaMultinomialNPP(CompStat = list(n0 = c(22,25,28,25), n1 = c(25,22,25,28)),
prior = list(theta.dir.alpha = c(0.5, 0.5, 0.5, 0.5),
delta.alpha = 1, delta.beta = 1))
ModeDeltaMultinomialNPP(CompStat = list(n0 = c(15,25,30,30), n1 = c(25,25,25,25)),
prior = list(theta.dir.alpha = c(0.5, 0.5, 0.5, 0.5),
delta.alpha = 1, delta.beta = 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.