ModeDeltaPoisNPP function

Calculate Posterior Mode of the Power Parameter in Normalized Power Prior with Grid Search, Poisson Population

Calculate Posterior Mode of the Power Parameter in Normalized Power Prior with Grid Search, Poisson Population

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.

ModeDeltaPoisNPP(Data.Cur, Data.Hist, CompStat = list(n0 = NULL, mean0 = NULL, n1 = NULL, mean1 = NULL), npoints = 1000, prior = list(lambda.shape = 1/2, lambda.scale = 100, delta.alpha = 1, delta.beta = 1))

Arguments

  • Data.Cur: a non-negative integer vector of each observed current data.

  • Data.Hist: a non-negative integer vector of each observed historical data.

  • CompStat: a list of four elements that represents the "compatibility(sufficient) statistics" for λ\lambda. Default is NULL so the fitting will be based on the data. If the CompStat is provided then the inputs in Data.Cur and Data.Hist will be ignored.

    n0 is the number of observations in the historical data.

    mean0 is the sample mean of the historical data.

    n1 is the number of observations in the current data.

    mean1 is the sample mean of the current data.

  • 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 λ\lambda and δ\delta. A Gamma distribution is used as the prior of λ\lambda, and a Beta distribution is used as the prior of δ\delta.

    lambda.shape is the shape (hyper)parameter in the prior distribution Gamma(shape,scale)Gamma(shape, scale) for λ\lambda.

    lambda.scale is the scale (hyper)parameter in the prior distribution Gamma(shape,scale)Gamma(shape, scale) for λ\lambda.

    delta.alpha is the hyperparameter α\alpha in the prior distribution Beta(α,β)Beta(\alpha, \beta) for δ\delta.

    delta.beta is the hyperparameter β\beta in the prior distribution Beta(α,β)Beta(\alpha, \beta) for δ\delta.

Returns

A numeric value between 0 and 1.

Details

See example.

Examples

ModeDeltaPoisNPP(CompStat = list(n0 = 50, mean0 = 10, n1 = 50, mean1 = 10), npoints = 1000, prior = list(lambda.shape = 1/2, lambda.scale = 100, delta.alpha = 1, delta.beta = 1)) ModeDeltaPoisNPP(CompStat = list(n0 = 50, mean0 = 10, n1 = 50, mean1 = 9.5), npoints = 1000, prior = list(lambda.shape = 1/2, lambda.scale = 100, delta.alpha = 1, delta.beta = 1)) ModeDeltaPoisNPP(CompStat = list(n0 = 50, mean0 = 10, n1 = 50, mean1 = 9), npoints = 1000, prior = list(lambda.shape = 1/2, lambda.scale = 100, delta.alpha = 1, delta.beta = 1))

Author(s)

Zifei Han hanzifei1@gmail.com

References

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.

See Also

ModeDeltaBerNPP; ModeDeltaNormalNPP; ModeDeltaMultinomialNPP

  • Maintainer: Zifei Han
  • License: GPL (>= 2)
  • Last published: 2023-12-12

Useful links