Chapter A12: Technical Derivations for Priors Returned by `Prior_Setup()Chapter A12: Technical Derivations for Priors Returned by Prior_Setup() | 1. Introduction | 1. Introductory Discussion | 2. Default Priors for Coefficient Means and Covariance Matrices | 2.1 How prior means are determined | 2.2 Data precision $P(\beta)$. | 2.3 Zellner-type prior using $P(\beta^{\ast})$ | 2.3.1 Precision mapping and default covariance scaling | [\Sigma_0 = \Sigma / d,]so[\Sigma_0^ | d,\Sigma^ | d,\frac | 2.3.2 Posterior mean and Variance under dNormal() | dNormal() (Gaussian, coefficient-scale covariance Sigma).For Gaussian likelihood precision $P(\beta^\ast)$ and prior precision$\Sigma^{-1}$,[E(\beta\mid y) | \bigl(P(\beta^\ast)+\Sigma^ | The posterior covariance is[\mathrm{Var}(\beta\mid y) | \bigl(P(\beta^\ast)+\Sigma^ | 2.3.3 Marginal posterior mean under dNormal_Gamma() | dNormal_Gamma() (Gaussian conjugate Normal--Gamma, using Sigma_0).The marginal posterior mean is[E(\beta\mid y) | E_{\tau\mid y}!\left[E(\beta\mid \tau,y)\right].]For fixed $\tau$,[E(\beta\mid \tau,y) | \bigl(\tau X^ | 2.4 Vector pwt and optional sd | 3. Default Priors for Dispersion, Shape, and Rate Parameters | 3.1 Posterior pieces: contribution from likelihood + Normal block | and the marginal quadratic term[S_ | 3.2 Prior-strength parameterization from pwt | The scalar prior‑weight pwt is mapped to an effective prior sample size[n_ | \frac | The dispersion‑free covariance used in dNormal_Gamma() is[\Sigma_0 | \frac | 3.3 Gaussian prior-family calibration and parameter mapping | 3.3.1 Default calibration and posterior Gamma shape/rate | Let (n_w=\sum_i w_i) be the effective sample size (n_effective).For scalar pwt, Prior_Setup() defines the effective prior sample size[n_ | \frac | 3.3.2 Conjugate Normal–Gamma posterior (dNormal_Gamma()) | Theorem 1 (Conjugate posterior under the default dNormal_Gamma() calibration) | Let the prior be[\beta\mid\tau\sim N(\mu,\tau^{-1}\Sigma_0),\qquad\tau\sim\Gamma(a_0,b_0),]with[\Sigma_0 | \frac | (i) Posterior mean of (\beta) | [\mu_ | \mathrm{pwt},\mu+(1-\mathrm{pwt}),\hat\beta | (ii) Posterior dispersion‑free covariance | [\Sigma_ | (\Sigma_0^ | \frac{n_{\mathrm{prior}}}{n_{\mathrm{prior}}+n_w},\Sigma_0 | (iii) Posterior Gamma shape | (iv) Posterior Gamma rate | (v) Marginal posterior mean of (\beta) | (vi) Posterior expectation of (\sigma^2=1/\tau) | For (a_n>1),[\mathbb{E}[\sigma^2\mid y] | \frac | (vii) Marginal posterior covariance of (\beta) | Let[V_n=\Sigma_ | Then[\mathrm{Cov}(\beta\mid y) | \mathbb{E}[\sigma^2\mid y],V_n | Interpretation | Theorem 2 (Weak‑prior limit of the dNormal_Gamma() posterior) | Under the default calibration of Theorem 1, let[n_ | (i) Limiting posterior mean of (\beta) | [\mu_ | \lim_ | (ii) Limiting dispersion‑free covariance | [\Sigma_ | \lim_ | (iii) Limiting Gamma shape | [a_ | \lim_{n_{\mathrm{prior}}\to 0^+} a_n | (iv) Limiting Gamma rate | [b_ | \lim_{n_{\mathrm{prior}}\to 0^+} b_n | (v) Limiting marginal mean of (\beta) | [\mathbb{E}{\Pi{0}}[\beta\mid y] | \mu_ | (vi) Limiting expectation of (\sigma^2 = 1/\tau) | For (\tau\mid y \sim \Gamma(a_{\Pi_{0}},b_{\Pi_{0}})),[\mathbb{E}{\Pi{0}}[\sigma^2\mid y] | \frac | (vii) Limiting marginal covariance of (\beta) | [\mathrm{Cov}{\Pi{0}}(\beta\mid y) | \mathbb | Proof of Theorem 2. | By Theorem 1, for each (n_{\mathrm{prior}}>0) the dNormal_Gamma posterior is Normal–Gamma withhyperparameters[\mu_{\mathrm{post}}(n_{\mathrm{prior}}),\quad\Sigma_{0,\mathrm{post}}(n_{\mathrm{prior}}),\quada_n(n_{\mathrm{prior}}),\quadb_n(n_{\mathrm{prior}}),]given explicitly by[\mu_{\mathrm{post}}(n_{\mathrm{prior}}) | \frac{n_{\mathrm{prior}}}{n_{\mathrm{prior}}+n_w},\mu+\frac{n_w}{n_{\mathrm{prior}}+n_w},\hat\beta,][\Sigma_{0,\mathrm{post}}(n_{\mathrm{prior}}) | \frac{n_w}{n_{\mathrm{prior}}+n_w},G^{-1},][a_n(n_{\mathrm{prior}}) | \frac{n_{\mathrm{prior}}+k+n_w}{2},\qquadb_n(n_{\mathrm{prior}}) | 3.3.3 Posterior covariance under dNormal() with default dispersion | Covariance under fixed (\sigma^2) | From Section 2.3.2, under scalar pwt,[\mathrm{Var}(\beta\mid y,\sigma^2) | For weighted Gaussian regression,[P(\beta^\ast) | \sigma^{-2}X^{\mathsf T}W_{\mathrm{obs}}X,]so[\mathrm{Var}(\beta\mid y,\sigma^2) | Using[n_ | \frac | \frac{n_w}{n_w+n_{\mathrm{prior}}},]this becomes[\mathrm{Var}(\beta\mid y,\sigma^2) | Default dispersion | To choose a default fixed value of (\sigma^2), Prior_Setup() uses theposterior mean from the Normal–Gamma model (Theorem 1 (vi)):[\mathrm | Substituting this into the covariance expression gives[\mathrm{Var}(\beta\mid y,\mathrm{dispersion}_{\mathrm{default}}) | Calibrated prior covariance returned by Prior_Setup() | With the same default dispersion, Prior_Setup() returns the coefficient‑scaleprior covariance[\Sigma_ | Weak‑prior limit | 3.3.4 Independent Normal–Gamma Prior | Coefficient-scale covariance:[\Sigma | ING Gamma shape:[\mathrm | a_0 + \frac | Gamma rate:[\texttt | b_0 | Theorem 3 (Weak-prior limit of the Independent Normal–Gamma posterior) | From the posterior ratio identity in A.2 and Lemma B, we have, for each (n_{\mathrm{prior}}>0),[\Pi^{(\mathrm{ING})}{n{\mathrm{prior}}}(\mathrm{d}\beta,\mathrm{d}\tau) | Let (f\colon\mathbb | For the moment statements, take (f(\beta,\tau)=\beta_j),(f(\beta,\tau)=\tau^{-1}), and(f(\beta,\tau)=(\beta-\mathbb{E}{\Pi_0}[\beta])(\beta-\mathbb{E}{\Pi_0}[\beta])^\top) componentwise.Lemma A again applies because Assumptions 4–5 ensure that the NG Gamma parametersstay uniformly bounded away from zero, giving uniform integrability of the correspondingNG moments.The same envelope (M) from Claim B.2 transfers this to the ING path via the ratiorepresentation. Hence dominated convergence applies to these (unbounded) test functionsas well, yielding[\mathbb{E}{\Pi^{(\mathrm{ING})}{n_{\mathrm{prior}}}}[\beta]\to\mathbb{E}{\Pi_0}[\beta]=\hat\beta,\quad\mathbb{E}{\Pi^{(\mathrm{ING})}{n{\mathrm{prior}}}}[\tau^{-1}]\to\mathbb{E}_{\Pi_0}[\tau^{-1}] | \frac{\mathrm{RSS}w}{n_w-p},]and[\mathrm{Cov}{\Pi^{(\mathrm{ING})}{n{\mathrm{prior}}}}(\beta\mid y)\to\mathrm{Cov}_{\Pi_0}(\beta\mid y) | 3.3.5 dGamma() Prior (Fixed $\beta$, Gamma Prior on Precision) | Prior on (\tau) (fixed-$\beta$ path) | Posterior for (\tau) given (y) and fixed (\beta^{+}) | Posterior expectation of (\sigma^2 = 1/\tau) | For (a_n > 1),[E[\sigma^2 \mid y, \beta^{+}] | \frac | This completes the description of the fixed-$\beta$ Gamma prior used by dGamma() andrGamma_reg(). | Appendix A: Technical Ingredients for the ING Weak‑Prior Limit | A.1 Common Gaussian Setup | A.2 Posterior Ratio Representation | NG prior (Theorem 1, §3.3.2) | For each (n_{\mathrm{prior}} > 0),[\beta \mid \tau \sim N!\left(\mu,;\tau^{-1}\Sigma_0\right),\qquad\tau \sim \Gamma!\left(a_0(n_{\mathrm{prior}}),, b_0(n_{\mathrm{prior}})\right),]where the dispersion–free Zellner matrix is[\Sigma_0 | ING prior (§3.3.4) | The ING prior uses a fixed coefficient–scale covariance and a Gamma shape shifted by (p/2):[\beta \mid n_{\mathrm{prior}} \sim N!\left(\mu,;\Sigma(n_{\mathrm{prior}})\right),\qquad\tau \sim \Gamma!\left(a_0(n_{\mathrm{prior}})+\tfrac{p}{2},; b_0(n_{\mathrm{prior}})\right),]with (\beta) and (\tau) independent, and[\Sigma(n_{\mathrm{prior}}) | Ratio of prior kernels | Define[R_{n_{\mathrm{prior}}}(\beta,\tau) | Because the ING Gamma shape equals the NG Gamma shape plus (p/2), the (\tau)-powers match and cancel.The ratio therefore reduces to[R_{n_{\mathrm{prior}}}(\beta,\tau) | Posterior ratio identity | A.3 Lemma A: Uniform moment bounds for the NG path | Lemma A (Uniform moment bounds for the NG posterior) | Claim A.1 (Continuity and compactness of NG hyperparameters) | [\mu_{\mathrm{post}}(n_{\mathrm{prior}}) | [\Sigma_{0,\mathrm{post}}(n_{\mathrm{prior}}) | [a_n(n_{\mathrm{prior}}) | \frac{n_{\mathrm{prior}} + k + n_w}{2},\qquadb_n(n_{\mathrm{prior}}) | Proof of Lemma A | Bounds for (\tau) | [\mathbb{E}[\tau \mid y, n_{\mathrm{prior}}] | \frac{a_n(n_{\mathrm{prior}})}{b_n(n_{\mathrm{prior}})},\qquad\mathbb{E}[\tau^2 \mid y, n_{\mathrm{prior}}] | Bounds for (\beta) | [\mathbb{E}[\beta \mid y, n_{\mathrm{prior}}] | [\mathrm{Cov}(\beta \mid y, n_{\mathrm{prior}}) | [\mathbb{E}[\sigma^2 \mid y, n_{\mathrm{prior}}] | [\mathbb{E}\bigl[|\beta|^2 \mid y, n_{\mathrm{prior}}\bigr] | A.4 Lemma B: Ratio convergence and domination | Let (R_{n_{\mathrm{prior}}}(\beta,\tau)) be the posterior density ratio[R_{n_{\mathrm{prior}}}(\beta,\tau) | Claim B.1 (Explicit prior ratio and quadratic form) | Then (\tilde R_{n_{\mathrm{prior}}}) can be written in the form[\tilde R_{n_{\mathrm{prior}}}(\beta,\tau) | From Section A.2, the NG and ING prior kernels are[\pi^{(\mathrm{NG})}{n{\mathrm{prior}}}(\beta,\tau)\propto\tau^{a_0(n_{\mathrm{prior}})+p/2-1}\exp!\left(-b_0(n_{\mathrm{prior}})\tau-\frac{\tau}{2}(\beta-\mu)^\top\Sigma_0^{-1}(\beta-\mu)\right),][\pi^{(\mathrm{ING})}{n{\mathrm{prior}}}(\beta,\tau)\propto\tau^{a_0(n_{\mathrm{prior}})+p/2-1}\exp!\left(-b_0(n_{\mathrm{prior}})\tau\right)\exp!\left(-\frac{1}{2}(\beta-\mu)^\top\Sigma(n_{\mathrm{prior}})^{-1}(\beta-\mu)\right),]with[\Sigma_0 | \frac{1-pwt}{pwt},(X^\top W_{\mathrm{obs}}X)^{-1},\qquad\Sigma(n_{\mathrm{prior}}) | The (\tau)-powers match (ING shape = NG shape (+;p/2)), so[\tilde R_{n_{\mathrm{prior}}}(\beta,\tau) | \frac | Then[\tilde R_{n_{\mathrm{prior}}}(\beta,\tau) | Using the explicit formula for (\Sigma(n_ | \frac{n_{\mathrm{prior}}}{n_w},\frac{n_w - p}{\mathrm{Smarg}},(X^\top W_{\mathrm{obs}}X),]we see that (\Sigma(n_{\mathrm{prior}})^{-1}\to 0) as (n_{\mathrm{prior}}\to 0^+).This uses Assumptions 2–3 to ensure the scalar prefactor is positive.Hence, for each fixed (\beta),[h_{n_{\mathrm{prior}}}(\beta) | Claim B.2 (Uniform envelope and integrability) | [M(\beta,\tau) | Recall[R_{n_{\mathrm{prior}}}(\beta,\tau) | \frac | \tilde R_ | \iint L(y\mid\beta,\tau),\pi^ | Step 1: Envelope for (\tilde R_{n_{\mathrm{prior}}}). | From Claim B.1 and the explicit formulas in A.2,[\log \tilde R_{n_{\mathrm{prior}}}(\beta,\tau) | Step 2: Boundedness of the normalizing–constant ratio. | Step 3: Envelope for (R_{n_{\mathrm{prior}}}) and integrability under (\Pi_0). | Combining Steps 1–2,[\bigl|R_{n_{\mathrm{prior}}}(\beta,\tau)\bigr|\leK,M_0(\beta,\tau) | Write both posteriors as[\pi^{(\cdot)}{n{\mathrm{prior}}}(\beta,\tau\mid y)\proptoL(y\mid\beta,\tau),\pi^{(\cdot)}{n{\mathrm{prior}}}(\beta,\tau),]with the common Gaussian likelihood (L(y\mid\beta,\tau)) from Section A.1.The likelihood cancels in the posterior ratio, so[R_{n_{\mathrm{prior}}}(\beta,\tau) | \frac | \tilde R_ | \iint L,\pi^ | By Claim B.1,[\tilde R_{n_{\mathrm{prior}}}(\beta,\tau) | In our explicit construction, (q_{n_{\mathrm{prior}}}(\beta)) does not depend on(n_{\mathrm{prior}}) at all, and[h_{n_{\mathrm{prior}}}(\beta) | Next, write the normalizing–constant ratio as[\frac | \frac | \frac | Finally,[R_{n_{\mathrm{prior}}}(\beta,\tau) | A.8 Summary | Appendix B: Derivation of Theorem 1 (Conjugate Normal–Gamma posterior) | B.1 Setup and joint kernel | Under the Zellner calibration in §3.3.2,[\Sigma_0 | \frac | The joint prior–likelihood kernel in ((\beta,\tau)) is[\pi(\beta,\tau\mid y)\propto\tau^{a_0-1}\exp(-b_0\tau),\tau^{p/2}\exp!\Bigl(-\tfrac{\tau}{2}(\beta-\mu)^\top\Sigma_0^{-1}(\beta-\mu)\Bigr),\tau^{n_w/2}\exp!\Bigl(-\tfrac{\tau}{2}\mathrm{RSS}_w(\beta)\Bigr),]where[\mathrm{RSS}_w(\beta) | B.2 Posterior Normal block: mean and dispersion‑free covariance | Write[G_{\mathrm{post}} := G + \Sigma_0^{-1},]and complete the square:[(\beta-\hat\beta)^\top G(\beta-\hat\beta)+(\beta-\mu)^\top\Sigma_0^{-1}(\beta-\mu) | Using (\Sigma_0^ | \Bigl(1+\frac{n_w}{n_{\mathrm{prior}}}\Bigr)G | \frac | Substituting into (\mu_ | \frac | G_ | \frac | B.3 Posterior Gamma block: shape and rate | The integral over (\beta) is a multivariate Gaussian integral:[\int \tau^{p/2}\exp!\Bigl(-\tfrac{\tau}{2}Q(\beta)\Bigr),d\beta | After cancellation, the only remaining powers of (\tau) are[a_0 - 1 + \frac{n_w}{2},]so the posterior Gamma shape is[a_n | a_0 + \frac | \frac | Thus[b_n = b_0 + \frac | \frac | B.4 Marginal moments of (\beta) and (\sigma^2) | Given (\tau), the posterior factorizes as[\beta\mid\tau,y \sim N\bigl(\mu_ | \frac | \frac{n_{\mathrm{prior}}+n_w}{n_w},G^{-1},][a_n | \frac{n_{\mathrm{prior}}+k+n_w}{2},\qquadb_n | Marginal mean of (\beta).Using the law of total expectation,[E[\beta\mid y] | E_\tau\bigl[E[\beta\mid\tau,y]\bigr] | E_\tau[\mu_{\mathrm{post}}] | \mu_{\mathrm{post}},]since (\mu_{\mathrm{post}}) does not depend on (\tau). Thus[E[\beta\mid y] | Marginal mean of (\sigma^2 = \tau^{-1}).For (\tau\sim\Gamma(a_n,b_n)) with shape–rate parameterization,[E[\tau^{-1}\mid y] | Substituting the expressions for (a_n) and (b_n),[E[\sigma^2\mid y] | \frac | Marginal covariance of (\beta).By the law of total covariance,[\mathrm{Cov}(\beta\mid y) | E_\tau\bigl[\mathrm{Cov}(\beta\mid\tau,y)\bigr]+\mathrm{Cov}\tau\bigl(E[\beta\mid\tau,y]\bigr).]Since (E[\beta\mid\tau,y]=\mu{\mathrm{post}}) does not depend on (\tau), the second term vanishes and[\mathrm{Cov}(\beta\mid y) | E_\tau\bigl[\tau^{-1}\Sigma_{0,\mathrm{post}}\bigr] | Substitute:[a_n-1 | \frac{n_{\mathrm{prior}}+k+n_w}{2}-1 | \frac{n_{\mathrm{prior}}+k+n_w-2}{2},]so[E[\tau^{-1}\mid y] | \frac | Step 2: (\Sigma_ | Under the Zellner calibration,[\Sigma_0 | \frac | Hence[\Sigma_0^{-1} + G | \Bigl(\frac{\mathrm{pwt}}{1-\mathrm{pwt}} + 1\Bigr)G | \frac | Now use the mapping between (\mathrm | \frac | Thus[\Sigma_ | (1-\mathrm | Step 3: Combine the pieces.Putting Steps 1 and 2 together,[\mathrm{Cov}(\beta\mid y) | E[\tau^ | In particular, the covariance can be written as[\mathrm{Cov}(\beta\mid y)
Rendered fromChapter-A12.Rmdusingknitr::rmarkdown