MCMC Sampling for Linear Regression Model of multiple historical data using Ordered Normalized Power Prior
MCMC Sampling for Linear Regression Model of multiple historical data using Ordered Normalized Power Prior
Multiple historical data are incorporated together. Conduct posterior sampling for Linear Regression Model with ordered normalized power prior. For the power parameter γ, a Metropolis-Hastings algorithm with independence proposal is used. For the model parameters (β,σ2), Gibbs sampling is used.
D0: a list of k elements representing k historical data, where the ith element corresponds to the ith historical data named as ``D0i''.
X: 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.
Y: a vector of individual level of the response y in the current data.
a0: a positive shape parameter for inverse-gamma prior on model parameter σ2.
b: a positive scale parameter for inverse-gamma prior on model parameter σ2.
mu0: a vector of the mean for prior β∣σ2.
R: a inverse matrix of the covariance matrix for prior β∣σ2.
gamma_ini: the initial value of γ in MCMC sampling.
prior_gamma: a vector of the hyperparameters in the prior distribution Dirichlet(α1,α2,...,αK) for γ.
gamma_ind_prop: a vector of the hyperparameters in the proposal distribution Dirichlet(α1,α2,...,αK) for γ.
nsample: specifies the number of posterior samples in the output.
burnin: the number of burn-ins. The output will only show MCMC samples after bunrin.
thin: the thinning parameter in MCMC sampling.
adjust: Whether or not to adjust the parameters of the proposal distribution.
Details
The outputs include posteriors of the model parameters and power parameter, acceptance rate in sampling γ. Let θ=(β,σ2), the normalized power prior distribution is
Here π0(γ) and π0(θ) are the initial prior distributions of γ and θ, respectively. L(θ∣D0k) is the likelihood function of historical data D0k, and ∑i=1kγi is the corresponding power parameter.
Returns
A list of class "NPP" with four elements: - acceptrate: the acceptance rate in MCMC sampling for γ using Metropolis-Hastings algorithm.
beta: posterior of the model parameter β in vector or matrix form.