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 δ 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.
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 λ. 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 λ and δ. A Gamma distribution is used as the prior of λ, and a Beta distribution is used as the prior of δ.
lambda.shape is the shape (hyper)parameter in the prior distribution Gamma(shape,scale) for λ.
lambda.scale is the scale (hyper)parameter in the prior distribution Gamma(shape,scale) for λ.
delta.alpha is the hyperparameter α in the prior distribution Beta(α,β) for δ.
delta.beta is the hyperparameter β in the prior distribution Beta(α,β) for δ.