## 3 Modeling Method for \(\mathbf{S_{h}}|\mathbf{X}^{F},\mathbf{X}^{S}\)
### Introduction of Gustafson Correction to Address NDB Covariate: RQ2
This leads to the expectation parameters taking the form of GLMs:  
\[\xi_{h}=E[N_{h}]=E[E[N_{h}|\mathbf{X}^{F}\mathbf{\beta}^{F}+\epsilon_{h}^ {F}]]=E[\exp\big{(}\mathbf{X}^{F}\mathbf{\beta}^{F}+\epsilon_{h}^{F}\big{)}]\approx \varepsilon^{\mathbf{X}^{F}\mathbf{\beta}^{F}} \tag{12a}\] \[e^{\mu_{h}+\frac{1}{2}\sigma^{2}}=E[\widetilde{Y}_{h}]=E[E[ \widetilde{Y}_{h}|\mathbf{X}^{5}\mathbf{\beta}^{5}+\epsilon_{h}^{5}]]=E[\exp\big{(} \mathbf{X}^{5}\mathbf{\beta}^{5}+\frac{1}{2}\sigma^{2}+\epsilon_{h}^{5}\big{)}]\approx \varepsilon^{\mathbf{X}^{5}\mathbf{\beta}^{5}+\frac{1}{2}\sigma^{2}} \tag{12b}\]  
where the residuals are normally distributed, \(\epsilon_{h}^{F}\sim\mathbf{N}(0,\sigma_{e^{F}}^{2})\), \(\epsilon_{h}^{5}\sim\mathbf{N}(0,\sigma_{e^{S}}^{2})\). Based on the frequency-severity principle, the conditional expected aggregate claim amount given \(\mathbf{X}=\{\mathbf{X}^{F},\ \mathbf{X}^{5}\}\) for a policy \(h\) is expressed as \(E[S_{h}|\mathbf{X}]=E[N_{h}|\mathbf{X}^{F}]\times E[\widetilde{Y}_{h}|\mathbf{X}^{5}]\). Consequently, the point estimate of the risk premium, considering the covariates \(\mathbf{X}^{F}\) and \(\mathbf{X}^{5}\), is determined by:  
\[E[S_{h}|\mathbf{X}^{F},\mathbf{X}^{5}]=\exp\big{(}\mathbf{X}^{F}\mathbf{\beta}^{F}+\mathbf{X}^{5} \mathbf{\beta}^{5}+\frac{1}{2}\sigma^{2}\big{)} \tag{13}\]  
**Hierarchical GLM with partial pooling:** However, incorporating covariates \(\mathbf{X}^{F}\) and \(\mathbf{X}^{5}\) into the model may introduce unobserved risk factors, leading to increased heterogeneity within each risk cluster \(j=1,\ldots,J\). To tackle this issue, we propose a hierarchical GLM that employs a distinct model for each parameter, along with cluster-specific GLM coefficient vectors and dispersion parameters \(\mathbf{\beta}_{j}^{F},\psi_{j},\mathbf{\beta}_{j}^{S},\sigma_{j}^{2}\) across all policies \(h=1,\ldots,H\). Consequently, Equation (13) with \(j(h)\in\{1,\ldots,J\}\) is redefined with the following prior selections:\[E[S_{j(h)}|\mathbf{X}^{F},\mathbf{X}^{S}]= \exp\left(\mathbf{X}^{F}\mathbf{\beta}_{j}^{F}+\mathbf{X}^{S}\mathbf{\beta}_{j}^{S}+ \frac{1}{2}\sigma_{j}^{2}\right)\] (14a) For \[N_{h}\left\{ \begin{aligned} \mathbf{\beta}_{j}^{F}\mid\mathbf{\beta}_{0}^{F}, \Sigma_{\beta_{0}}^{F}&\sim\mathbf{MVN}(\mathbf{\beta}_{0}^{F},\Sigma_{ \beta_{0}}^{F})\\ \psi_{j}\mid u_{0}^{F},v_{0}^{F}&\sim\mathbf{Ga}(\frac{u_{0 }^{F}}{2},\frac{v_{0}^{F}}{2})\\ \end{aligned} \right.\] (14b) For \[\bar{\gamma}_{h}\left\{ \begin{aligned} \mathbf{\beta}_{j}^{S}\mid\mathbf{\beta}_{0}^{S}, \Sigma_{\beta_{0}}^{S}&\sim\mathbf{MVN}(\mathbf{\beta}_{0}^{S},\Sigma_{ \beta_{0}}^{S})\\ \sigma_{j}^{2}\mid u_{0}^{S},v_{0}^{S}&\sim\mathbf{ Inv}(\frac{u_{0}^{S}}{2},\frac{v_{0}^{S}}{2})\\ \end{aligned} \right.\] (14c) For \[\mathbf{X}^{F}\left\{ \begin{aligned} \mathbf{x}_{j(h)}^{F}&\sim \mathbf{N}(E[\mathbf{x}_{j}^{F}],\,\lambda_{j}^{2F})\\ \lambda_{j}^{2F}&\sim\mathbf{ Inv}(c_{0}^{F},d_{0}^{F})\\ \Sigma_{j(h)}^{F}&\sim\mathbf{ Bernoulli}(\pi_{j}^{F})\\ \pi_{j}^{F}&\sim\mathbf{Beta}(g_{0}^{F},h_{0}^{F})\\ \end{aligned} \right.\] (14d) For \[\mathbf{X}^{S}\left\{ \begin{aligned} \mathbf{x}_{j(h)}^{S}&\sim \mathbf{N}(E[\mathbf{x}_{j}^{S}],\,\lambda_{j}^{2S})\\ \lambda_{j}^{2S}&\sim\mathbf{ Inv}\mathbf{Ga}(c_{0}^{S},d_{0}^{S})\\ \Sigma_{j(h)}^{S}&\sim\mathbf{ Bernoulli}(\pi_{j}^{F})\\ \pi_{j}^{S}&\sim\mathbf{Beta}(g_{0}^{S},h_{0}^{S})\\ \end{aligned} \right. \tag{14e}\]  
Equation (14) presents a Bayesian hierarchical GLM in which the hyperparameters are dynamically updated based on the observed data. [PERSON] and [PERSON] (2013) [PERSON] and [PERSON] (2013) [PERSON] and [PERSON] (2008) [PERSON] and [PERSON] (2013) recommend a Multivariate Gaussian prior for \(\mathbf{\beta}\) due to the Normality assumption, a Gamma prior for \(\psi\), and an Inverse Gamma prior for \(\sigma^{2}\) due to its positive nature and adjustability. In this way, the hierarchical structure in Equation (14) encompasses several layers, each influenced by the data differently to adjust the degree of sharing in pooling.