NPP (version 0.1.0)

ModeDeltaNormalNPP: Calculate Posterior Mode of the Power Parameter in Normalized Power Prior with Grid Search, Normal Population

Description

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.

Usage

ModeDeltaNormalNPP(Data.Cur, Data.Hist,
                   CompStat = list(n0 = NULL, mean0 = NULL, var0 = NULL,
                                   n1 = NULL, mean1 = NULL, var1 = NULL),
                   npoints = 1000,
                   prior = list(joint.a = 1.5, delta.alpha = 1, delta.beta = 1))

Arguments

Data.Cur

a vector of individual level current data.

Data.Hist

a vector of individual level historical data.

CompStat

a list of six elements(scalar) that represents the "compatibility(sufficient) statistics" for model parameters. 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 sample size of historical data.

mean0 is the sample mean of the historical data.

var0 is the sample variance of the historical data.

n1 is the sample size of current data.

mean1 is the sample mean of the current data.

var1 is the sample variance 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 \((\mu, \sigma^2)\) and \(\delta\). The form of the prior for model parameter \((\mu, \sigma^2)\) is \((1/\sigma^2)^a\). When \(a = 1\) it corresponds to the reference prior, and when \(a = 1.5\) it corresponds to the Jeffrey's prior.

joint.a is the power \(a\) in formula \((1/\sigma^2)^a\), the prior for \((\mu, \sigma^2)\) jointly.

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

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

Value

A numeric value between 0 and 1.

Details

See example.

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.

Berger, J.O. and Bernardo, J.M. (1992). On the development of reference priors. Bayesian Statistics 4: Proceedings of the Fourth Valencia International Meeting, Bernardo, J.M, Berger, J.O., Dawid, A.P. and Smith, A.F.M. eds., 35-60, Clarendon Press:Oxford.

Jeffreys, H. (1946). An Invariant Form for the Prior Probability in Estimation Problems. Proceedings of the Royal Statistical Society of London, Series A 186:453-461.

See Also

ModeDeltaBerNPP; ModeDeltaMultinomialNPP; ModeDeltaPoisNPP

Examples

Run this code
# NOT RUN {
ModeDeltaNormalNPP(CompStat = list(n0 = 50, mean0 = 0, var0 = 1,
                                   n1 = 50, mean1 = 0, var1 = 1), npoints = 1000,
                   prior = list(joint.a = 1.5, delta.alpha = 1, delta.beta = 1))

ModeDeltaNormalNPP(CompStat = list(n0 = 50, mean0 = 0, var0 = 1,
                                   n1 = 40, mean1 = 0.2, var1 = 1), npoints = 1000,
                   prior = list(joint.a = 1.5, delta.alpha = 1, delta.beta = 1))

ModeDeltaNormalNPP(CompStat = list(n0 = 50, mean0 = 0, var0 = 1,
                                   n1 = 40, mean1 = 0.6, var1 = 1), npoints = 1000,
                   prior = list(joint.a = 1.5, delta.alpha = 1, delta.beta = 1))

# }

Run the code above in your browser using DataLab