Bayesian hierarchical modeling

From HandWiki
Short description: Statistical model written in multiple levels

Bayesian hierarchical modelling is a statistical model written in multiple levels (hierarchical form) that estimates the parameters of the posterior distribution using the Bayesian method.[1] The sub-models combine to form the hierarchical model, and Bayes' theorem is used to integrate them with the observed data and account for all the uncertainty that is present. The result of this integration is the posterior distribution, also known as the updated probability estimate, as additional evidence on the prior distribution is acquired.

Frequentist statistics may yield conclusions seemingly incompatible with those offered by Bayesian statistics due to the Bayesian treatment of the parameters as random variables and its use of subjective information in establishing assumptions on these parameters.[2] As the approaches answer different questions the formal results aren't technically contradictory but the two approaches disagree over which answer is relevant to particular applications. Bayesians argue that relevant information regarding decision-making and updating beliefs cannot be ignored and that hierarchical modeling has the potential to overrule classical methods in applications where respondents give multiple observational data. Moreover, the model has proven to be robust, with the posterior distribution less sensitive to the more flexible hierarchical priors.

Hierarchical modeling is used when information is available on several different levels of observational units. For example, in epidemiological modeling to describe infection trajectories for multiple countries, observational units are countries, and each country has its own temporal profile of daily infected cases.[3] In decline curve analysis to describe oil or gas production decline curve for multiple wells, observational units are oil or gas wells in a reservoir region, and each well has each own temporal profile of oil or gas production rates (usually, barrels per month).[4] Data structure for the hierarchical modeling retains nested data structure. The hierarchical form of analysis and organization helps in the understanding of multiparameter problems and also plays an important role in developing computational strategies.[5]

Philosophy

Statistical methods and models commonly involve multiple parameters that can be regarded as related or connected in such a way that the problem implies a dependence of the joint probability model for these parameters.[6] Individual degrees of belief, expressed in the form of probabilities, come with uncertainty.[7] Amidst this is the change of the degrees of belief over time. As was stated by Professor José M. Bernardo and Professor Adrian F. Smith, “The actuality of the learning process consists in the evolution of individual and subjective beliefs about the reality.” These subjective probabilities are more directly involved in the mind rather than the physical probabilities.[7] Hence, it is with this need of updating beliefs that Bayesians have formulated an alternative statistical model which takes into account the prior occurrence of a particular event.[8]

Bayes' theorem

The assumed occurrence of a real-world event will typically modify preferences between certain options. This is done by modifying the degrees of belief attached, by an individual, to the events defining the options.[9]

Suppose in a study of the effectiveness of cardiac treatments, with the patients in hospital j having survival probability [math]\displaystyle{ \theta_j }[/math], the survival probability will be updated with the occurrence of y, the event in which a controversial serum is created which, as believed by some, increases survival in cardiac patients.

In order to make updated probability statements about [math]\displaystyle{ \theta_j }[/math], given the occurrence of event y, we must begin with a model providing a joint probability distribution for [math]\displaystyle{ \theta_j }[/math] and y. This can be written as a product of the two distributions that are often referred to as the prior distribution [math]\displaystyle{ P(\theta) }[/math] and the sampling distribution [math]\displaystyle{ P(y\mid\theta) }[/math] respectively:

[math]\displaystyle{ P(\theta, y) = P(\theta)P(y\mid\theta) }[/math]

Using the basic property of conditional probability, the posterior distribution will yield:

[math]\displaystyle{ P(\theta\mid y)=\frac{P(\theta,y)}{P(y)} = \frac{P(y\mid\theta)P(\theta)}{P(y)} }[/math]

This equation, showing the relationship between the conditional probability and the individual events, is known as Bayes' theorem. This simple expression encapsulates the technical core of Bayesian inference which aims to incorporate the updated belief, [math]\displaystyle{ P(\theta\mid y) }[/math], in appropriate and solvable ways.[9]

Exchangeability

The usual starting point of a statistical analysis is the assumption that the n values [math]\displaystyle{ y_1, y_2, \ldots, y_n }[/math] are exchangeable. If no information – other than data y – is available to distinguish any of the [math]\displaystyle{ \theta_j }[/math]’s from any others, and no ordering or grouping of the parameters can be made, one must assume symmetry among the parameters in their prior distribution.[10] This symmetry is represented probabilistically by exchangeability. Generally, it is useful and appropriate to model data from an exchangeable distribution as independently and identically distributed, given some unknown parameter vector [math]\displaystyle{ \theta }[/math], with distribution [math]\displaystyle{ P(\theta) }[/math].

Finite exchangeability

For a fixed number n, the set [math]\displaystyle{ y_1, y_2, \ldots, y_n }[/math] is exchangeable if the joint probability [math]\displaystyle{ P(y_1, y_2, \ldots, y_n) }[/math] is invariant under permutations of the indices. That is, for every permutation [math]\displaystyle{ \pi }[/math] or [math]\displaystyle{ (\pi_1, \pi_2, \ldots, \pi_n) }[/math] of (1, 2, …, n), [math]\displaystyle{ P(y_1, y_2, \ldots, y_n)= P(y_{\pi_1}, y_{\pi_2}, \ldots, y_{\pi_n}). }[/math][11]

Following is an exchangeable, but not independent and identical (iid), example: Consider an urn with a red ball and a blue ball inside, with probability [math]\displaystyle{ \frac{1}{2} }[/math] of drawing either. Balls are drawn without replacement, i.e. after one ball is drawn from the n balls, there will be n − 1 remaining balls left for the next draw.

[math]\displaystyle{ \text{Let } Y_i = \begin{cases} 1, & \text{if the }i\text{th ball is red},\\ 0, & \text{otherwise}. \end{cases} }[/math]

Since the probability of selecting a red ball in the first draw and a blue ball in the second draw is equal to the probability of selecting a blue ball on the first draw and a red on the second draw, both of which are equal to 1/2 (i.e. [math]\displaystyle{ [P(y_1 = 1, y_2 =0) = P(y_1=0,y_2=1)= \frac{1}{2}] }[/math]), then [math]\displaystyle{ y_1 }[/math] and [math]\displaystyle{ y_2 }[/math] are exchangeable.

But the probability of selecting a red ball on the second draw given that the red ball has already been selected in the first draw is 0, and is not equal to the probability that the red ball is selected in the second draw which is equal to 1/2 (i.e. [math]\displaystyle{ [P(y_2=1\mid y_1=1)=0 \ne P(y_2=1)= \frac{1}{2}] }[/math]). Thus, [math]\displaystyle{ y_1 }[/math] and [math]\displaystyle{ y_2 }[/math] are not independent.

If [math]\displaystyle{ x_1, \ldots, x_n }[/math] are independent and identically distributed, then they are exchangeable, but the converse is not necessarily true.[12]

Infinite exchangeability

Infinite exchangeability is the property that every finite subset of an infinite sequence [math]\displaystyle{ y_1 }[/math], [math]\displaystyle{ y_2, \ldots }[/math] is exchangeable. That is, for any n, the sequence [math]\displaystyle{ y_1, y_2, \ldots, y_n }[/math] is exchangeable.[12]

Hierarchical models

Components

Bayesian hierarchical modeling makes use of two important concepts in deriving the posterior distribution,[1] namely:

  1. Hyperparameters: parameters of the prior distribution
  2. Hyperpriors: distributions of Hyperparameters

Suppose a random variable Y follows a normal distribution with parameter θ as the mean and 1 as the variance, that is [math]\displaystyle{ Y\mid \theta \sim N(\theta,1) }[/math]. The tilde relation [math]\displaystyle{ \sim }[/math] can be read as "has the distribution of" or "is distributed as". Suppose also that the parameter [math]\displaystyle{ \theta }[/math] has a distribution given by a normal distribution with mean [math]\displaystyle{ \mu }[/math] and variance 1, i.e. [math]\displaystyle{ \theta\mid\mu \sim N(\mu,1) }[/math]. Furthermore, [math]\displaystyle{ \mu }[/math] follows another distribution given, for example, by the standard normal distribution, [math]\displaystyle{ \text{N}(0,1) }[/math]. The parameter [math]\displaystyle{ \mu }[/math] is called the hyperparameter, while its distribution given by [math]\displaystyle{ \text{N}(0,1) }[/math] is an example of a hyperprior distribution. The notation of the distribution of Y changes as another parameter is added, i.e. [math]\displaystyle{ Y \mid \theta,\mu \sim N(\theta,1) }[/math]. If there is another stage, say, [math]\displaystyle{ \mu }[/math] follows another normal distribution with mean [math]\displaystyle{ \beta }[/math] and variance [math]\displaystyle{ \epsilon }[/math], meaning [math]\displaystyle{ \mu \sim N(\beta,\epsilon) }[/math], [math]\displaystyle{ \mbox { } }[/math][math]\displaystyle{ \beta }[/math] and [math]\displaystyle{ \epsilon }[/math] can also be called hyperparameters while their distributions are hyperprior distributions as well.[6]

Framework

Let [math]\displaystyle{ y_j }[/math] be an observation and [math]\displaystyle{ \theta_j }[/math] a parameter governing the data generating process for [math]\displaystyle{ y_j }[/math]. Assume further that the parameters [math]\displaystyle{ \theta_1, \theta_2, \ldots, \theta_j }[/math] are generated exchangeably from a common population, with distribution governed by a hyperparameter [math]\displaystyle{ \phi }[/math].
The Bayesian hierarchical model contains the following stages:

[math]\displaystyle{ \text{Stage I: } y_j\mid\theta_j,\phi \sim P(y_j\mid\theta_j,\phi) }[/math]
[math]\displaystyle{ \text{Stage II: } \theta_j\mid\phi \sim P(\theta_j\mid\phi) }[/math]
[math]\displaystyle{ \text{Stage III: } \phi \sim P(\phi) }[/math]

The likelihood, as seen in stage I is [math]\displaystyle{ P(y_j\mid\theta_j,\phi) }[/math], with [math]\displaystyle{ P(\theta_j,\phi) }[/math] as its prior distribution. Note that the likelihood depends on [math]\displaystyle{ \phi }[/math] only through [math]\displaystyle{ \theta_j }[/math].

The prior distribution from stage I can be broken down into:

[math]\displaystyle{ P(\theta_j,\phi) = P(\theta_j\mid\phi)P(\phi) }[/math] [from the definition of conditional probability]

With [math]\displaystyle{ \phi }[/math] as its hyperparameter with hyperprior distribution, [math]\displaystyle{ P(\phi) }[/math].

Thus, the posterior distribution is proportional to:

[math]\displaystyle{ P(\phi,\theta_j\mid y) \propto P(y_j \mid\theta_j,\phi) P(\theta_j,\phi) }[/math] [using Bayes' Theorem]
[math]\displaystyle{ P(\phi,\theta_j\mid y) \propto P(y_j\mid\theta_j ) P(\theta_j \mid\phi ) P(\phi) }[/math][13]

Example

To further illustrate this, consider the example: A teacher wants to estimate how well a student did on the SAT. The teacher uses information on the student’s high school grades and current grade point average (GPA) to come up with an estimate. The student's current GPA, denoted by [math]\displaystyle{ Y }[/math], has a likelihood given by some probability function with parameter [math]\displaystyle{ \theta }[/math], i.e. [math]\displaystyle{ Y\mid\theta \sim P(Y\mid\theta) }[/math]. This parameter [math]\displaystyle{ \theta }[/math] is the SAT score of the student. The SAT score is viewed as a sample coming from a common population distribution indexed by another parameter [math]\displaystyle{ \phi }[/math], which is the high school grade of the student (freshman, sophomore, junior or senior).[14] That is, [math]\displaystyle{ \theta\mid\phi \sim P(\theta\mid\phi) }[/math]. Moreover, the hyperparameter [math]\displaystyle{ \phi }[/math] follows its own distribution given by [math]\displaystyle{ P(\phi) }[/math], a hyperprior. To solve for the SAT score given information on the GPA,

[math]\displaystyle{ P(\theta,\phi\mid Y) \propto P(Y\mid\theta,\phi)P(\theta,\phi) }[/math]
[math]\displaystyle{ P(\theta,\phi\mid Y) \propto P(Y\mid\theta)P(\theta\mid\phi)P(\phi) }[/math]

All information in the problem will be used to solve for the posterior distribution. Instead of solving only using the prior distribution and the likelihood function, the use of hyperpriors gives more information to make more accurate beliefs in the behavior of a parameter.[15]

2-stage hierarchical model

In general, the joint posterior distribution of interest in 2-stage hierarchical models is:

[math]\displaystyle{ P(\theta,\phi\mid Y) = {P(Y\mid\theta,\phi) P(\theta,\phi) \over P(Y)} = {P(Y\mid\theta)P(\theta\mid\phi)P(\phi) \over P(Y)} }[/math]
[math]\displaystyle{ P(\theta,\phi\mid Y) \propto P(Y\mid\theta)P(\theta\mid\phi)P(\phi) }[/math][15]

3-stage hierarchical model

For 3-stage hierarchical models, the posterior distribution is given by:

[math]\displaystyle{ P(\theta,\phi, X\mid Y) = {P(Y\mid\theta)P(\theta\mid\phi)P(\phi\mid X)P(X) \over P(Y)} }[/math]
[math]\displaystyle{ P(\theta,\phi, X\mid Y) \propto P(Y\mid\theta)P(\theta\mid\phi)P(\phi\mid X)P(X) }[/math][15]

Bayesian nonlinear mixed-effects model

Bayesian research cycle using Bayesian nonlinear mixed effects model: (a) standard research cycle and (b) Bayesian-specific workflow [16].

The framework of Bayesian hierarchical modeling is frequently used in diverse applications. Particularly, Bayesian nonlinear mixed-effects models have recently[when?] received significant attention.[by whom?] A basic version of the Bayesian nonlinear mixed-effects models is represented as the following three-stage:

Stage 1: Individual-Level Model

[math]\displaystyle{ {y}_{ij} = f(t_{ij};\theta_{1i},\theta_{2i},\ldots,\theta_{li},\ldots,\theta_{Ki} ) + \epsilon_{ij},\quad \epsilon_{ij} \sim N(0, \sigma^2), \quad i =1,\ldots, N, \, j = 1,\ldots, M_i. }[/math]

Stage 2: Population Model

[math]\displaystyle{ \theta_{li}= \alpha_l + \sum_{b=1}^{P}\beta_{lb}x_{ib} + \eta_{li}, \quad \eta_{li} \sim N(0, \omega_l^2), \quad i =1,\ldots, N, \, l=1,\ldots, K. }[/math]

Stage 3: Prior

[math]\displaystyle{ \sigma^2 \sim \pi(\sigma^2),\quad \alpha_l \sim \pi(\alpha_l), \quad (\beta_{l1},\ldots,\beta_{lb},\ldots,\beta_{lP}) \sim \pi(\beta_{l1},\ldots,\beta_{lb},\ldots,\beta_{lP}), \quad \omega_l^2 \sim \pi(\omega_l^2), \quad l=1,\ldots, K. }[/math]

Here, [math]\displaystyle{ y_{ij} }[/math] denotes the continuous response of the [math]\displaystyle{ i }[/math]-th subject at the time point [math]\displaystyle{ t_{ij} }[/math], and [math]\displaystyle{ x_{ib} }[/math] is the [math]\displaystyle{ b }[/math]-th covariate of the [math]\displaystyle{ i }[/math]-th subject. Parameters involved in the model are written in Greek letters. [math]\displaystyle{ f(t ; \theta_{1},\ldots,\theta_{K}) }[/math] is a known function parameterized by the [math]\displaystyle{ K }[/math]-dimensional vector [math]\displaystyle{ (\theta_{1},\ldots,\theta_{K}) }[/math]. Typically, [math]\displaystyle{ f }[/math] is a `nonlinear' function and describes the temporal trajectory of individuals. In the model, [math]\displaystyle{ \epsilon_{ij} }[/math] and [math]\displaystyle{ \eta_{li} }[/math] describe within-individual variability and between-individual variability, respectively. If Stage 3: Prior is not considered, then the model reduces to a frequentist nonlinear mixed-effect model.


A central task in the application of the Bayesian nonlinear mixed-effect models is to evaluate the posterior density:

[math]\displaystyle{ \pi(\{\theta_{li}\}_{i=1,l=1}^{N,K},\sigma^2, \{\alpha_l\}_{l=1}^K, \{\beta_{lb}\}_{l=1,b=1}^{K,P},\{\omega_l\}_{l=1}^K | \{y_{ij}\}_{i=1,j=1}^{N,M_i}) }[/math]

[math]\displaystyle{ \propto \pi(\{y_{ij}\}_{i=1,j=1}^{N,M_i}, \{\theta_{li}\}_{i=1,l=1}^{N,K},\sigma^2, \{\alpha_l\}_{l=1}^K, \{\beta_{lb}\}_{l=1,b=1}^{K,P},\{\omega_l\}_{l=1}^K) }[/math]

[math]\displaystyle{ = \underbrace{\pi(\{y_{ij}\}_{i=1,j=1}^{N,M_i} |\{\theta_{li}\}_{i=1,l=1}^{N,K},\sigma^2)}_{Stage 1: Individual-Level Model} \times \underbrace{\pi(\{\theta_{li}\}_{i=1,l=1}^{N,K}|\{\alpha_l\}_{l=1}^K, \{\beta_{lb}\}_{l=1,b=1}^{K,P},\{\omega_l\}_{l=1}^K)}_{Stage 2: Population Model} \times \underbrace{p(\sigma^2, \{\alpha_l\}_{l=1}^K, \{\beta_{lb}\}_{l=1,b=1}^{K,P},\{\omega_l\}_{l=1}^K)}_{Stage 3: Prior} }[/math]


The panel on the right displays Bayesian research cycle using Bayesian nonlinear mixed-effects model.[16] A research cycle using the Bayesian nonlinear mixed-effects model comprises two steps: (a) standard research cycle and (b) Bayesian-specific workflow. Standard research cycle involves literature review, defining a problem and specifying the research question and hypothesis. Bayesian-specific workflow comprises three sub-steps: (b)–(i) formalizing prior distributions based on background knowledge and prior elicitation; (b)–(ii) determining the likelihood function based on a nonlinear function [math]\displaystyle{ f }[/math]; and (b)–(iii) making a posterior inference. The resulting posterior inference can be used to start a new research cycle.

References

  1. 1.0 1.1 Allenby, Rossi, McCulloch (January 2005). "Hierarchical Bayes Model: A Practitioner’s Guide". Journal of Bayesian Applications in Marketing, pp. 1–4. Retrieved 26 April 2014, p. 3
  2. Gelman, Andrew; Carlin, John B.; Stern, Hal S.; Rubin, Donald B. (2004). Bayesian Data Analysis (second ed.). Boca Raton, Florida: CRC Press. pp. 4–5. ISBN 1-58488-388-X. 
  3. Lee, Se Yoon; Lei, Bowen; Mallick, Bani (2020). "Estimation of COVID-19 spread curves integrating global data and borrowing information". PLOS ONE 15 (7): e0236860. doi:10.1371/journal.pone.0236860. PMID 32726361. 
  4. Lee, Se Yoon; Mallick, Bani (2021). "Bayesian Hierarchical Modeling: Application Towards Production Results in the Eagle Ford Shale of South Texas". Sankhya B 84: 1–43. doi:10.1007/s13571-020-00245-8. 
  5. Gelman et al. 2004, p. 6.
  6. 6.0 6.1 Gelman et al. 2004, p. 117.
  7. 7.0 7.1 Good, I.J. (1980). "Some history of the hierarchical Bayesian methodology". Trabajos de Estadistica y de Investigacion Operativa 31: 489–519. doi:10.1007/BF02888365. http://dialnet.unirioja.es/servlet/oaiart?codigo=2368428. 
  8. Bernardo, Smith(1994). Bayesian Theory. Chichester, England: John Wiley & Sons, ISBN:0-471-92416-4, p. 23
  9. 9.0 9.1 Gelman et al. 2004, pp. 6–8.
  10. Bernardo, Degroot, Lindley (September 1983). “Proceedings of the Second Valencia International Meeting”. Bayesian Statistics 2. Amsterdam: Elsevier Science Publishers B.V, ISBN:0-444-87746-0, pp. 167–168
  11. Gelman et al. 2004, pp. 121–125.
  12. 12.0 12.1 Diaconis, Freedman (1980). “Finite exchangeable sequences”. Annals of Probability, pp. 745–747
  13. Bernardo, Degroot, Lindley (September 1983). “Proceedings of the Second Valencia International Meeting”. Bayesian Statistics 2. Amsterdam: Elsevier Science Publishers B.V, ISBN:0-444-87746-0, pp. 371–372
  14. Gelman et al. 2004, pp. 120–121.
  15. 15.0 15.1 15.2 Box G. E. P., Tiao G. C. (1965). "Multiparameter problem from a bayesian point of view". Multiparameter Problems From A Bayesian Point of View Volume 36 Number 5. New York City: John Wiley & Sons, ISBN:0-471-57428-7
  16. 16.0 16.1 Lee, Se Yoon (2022). "Bayesian Nonlinear Models for Repeated Measurement Data: An Overview, Implementation, and Applications". Mathematics 10 (6): 898. doi:10.3390/math10060898.