ModeDeltaLMNPP {NPP} | R Documentation |
Calculate Posterior Mode of the Power Parameter in Normalized Power Prior with Grid Search, Normal Linear Model
Description
The function returns the posterior mode of the power parameter \delta
in normal linear model.
It calculates the log of the posterior density (up to a normalizing constant), and conduct a grid search
to find the approximate mode.
Usage
ModeDeltaLMNPP(y.Cur, y.Hist, x.Cur = NULL, x.Hist = NULL, npoints = 1000,
prior = list(a = 1.5, b = 0, mu0 = 0, Rinv = matrix(1, nrow = 1),
delta.alpha = 1, delta.beta = 1))
Arguments
y.Cur |
a vector of individual level of the response y in current data. |
y.Hist |
a vector of individual level of the response y in historical data. |
x.Cur |
a vector or matrix or data frame of covariate observed in the current data. If more than 1 covariate available, the number of rows is equal to the number of observations. |
x.Hist |
a vector or matrix or data frame of covariate observed in the historical data. If more than 1 covariate available, the number of rows is equal to the number of observations. |
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 model parameters
|
Details
If b = 1
, prior for (\beta, \sigma)
is (1/\sigma^2)^a * N(mu0, \sigma^2 R^{-1})
, which includes the g-prior.
If b = 0
, prior for (\beta, \sigma)
is (1/\sigma^2)^a
.
The outputs include posteriors of the model parameter(s) and power parameter, acceptance rate when sampling \delta
, and
the deviance information criteria.
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.
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
;
ModeDeltaNormalNPP
;
ModeDeltaMultinomialNPP
;
ModeDeltaNormalNPP