GHK algorithm

From HandWiki
Short description: Importance sampling method

The GHK algorithm (Geweke, Hajivassiliou and Keane)[1] is an importance sampling method for simulating choice probabilities in the multivariate probit model. These simulated probabilities can be used to recover parameter estimates from the maximized likelihood equation using any one of the usual well known maximization methods (Newton's method, BFGS, etc.). Train[2] has well documented steps for implementing this algorithm for a multinomial probit model. What follows here will apply to the binary multivariate probit model.

Consider the case where one is attempting to evaluate the choice probability of [math]\displaystyle{ \Pr(\mathbf{y_i} |\mathbf{X_i\beta}, \Sigma) }[/math] where [math]\displaystyle{ \mathbf{y_i} = (y_1, ..., y_J), \ (i = 1,...,N) }[/math] and where we can take [math]\displaystyle{ j }[/math] as choices and [math]\displaystyle{ i }[/math] as individuals or observations, [math]\displaystyle{ \mathbf{X_i\beta} }[/math] is the mean and [math]\displaystyle{ \Sigma }[/math] is the covariance matrix of the model. The probability of observing choice [math]\displaystyle{ \mathbf{y_i} }[/math] is

[math]\displaystyle{ \begin{align} \Pr(\mathbf{y_i}|\mathbf{X_i\beta}, \Sigma) = & \int_{A_J}\cdots\int_{A_1}f_N(\mathbf{y}^*_i|\mathbf{X_i\beta}, \Sigma) dy^*_1\dots dy^*_J \\ \Pr(\mathbf{y_i}|\mathbf{X_i\beta}, \Sigma) = & \int \mathbb{1}_{y^* \in A} f_N(\mathbf{y}^*_i|\mathbf{X_i\beta}, \Sigma) d\mathbf{y}^*_i \end{align} }[/math]

Where [math]\displaystyle{ A = A_1 \times \cdots \times A_J }[/math] and,

[math]\displaystyle{ A_j = \begin{cases} (-\infty,0] & y_j = 0 \\ (0, \infty) & y_j = 1 \end{cases} }[/math]

Unless [math]\displaystyle{ J }[/math] is small (less than or equal to 2) there is no closed form solution for the integrals defined above (some work has been done with [math]\displaystyle{ J = 3 }[/math][3]). The alternative to evaluating these integrals closed form or by quadrature methods is to use simulation. GHK is a simulation method to simulate the probability above using importance sampling methods.

Evaluating [math]\displaystyle{ \Pr(\mathbf{y_i}|\mathbf{X_i\beta}, \Sigma) = \int \mathbb{1}_{y^* \in A} f_N(\mathbf{y}^*_i|\mathbf{X_i\beta}, \Sigma) d\mathbf{y}^*_i }[/math] is simplified by recognizing that the latent data model [math]\displaystyle{ \mathbf{y_i^*} = \mathbf{X_i\beta} + \epsilon }[/math] can be rewritten using a Cholesky factorization, [math]\displaystyle{ \Sigma = CC' }[/math]. This gives [math]\displaystyle{ \mathbf{y_i^*} = \mathbf{X_i\beta} + C\eta_i }[/math] where the [math]\displaystyle{ \eta_i }[/math] terms are distributed [math]\displaystyle{ N(0,\mathbf{I}) }[/math].

Using this factorization and the fact that the [math]\displaystyle{ \eta_i }[/math] are distributed independently one can simulate draws from a truncated multivariate normal distribution using draws from a univariate random normal.

For example, if the region of truncation [math]\displaystyle{ \mathbf{A} }[/math] has lower and upper limits equal to [math]\displaystyle{ [a,b] }[/math] (including a,b = [math]\displaystyle{ \pm\infty }[/math]) then the task becomes

[math]\displaystyle{ \begin{array}{lcl} a \lt & y^*_1 & \lt b \\ a \lt & y^*_2 & \lt b \\ \vdots & \vdots & \vdots \\ a \lt & y^*_J & \lt b \\ \end{array} }[/math]

Note: [math]\displaystyle{ \mathbf{y_i^*} = \mathbf{X_i\beta} + C\eta_i }[/math], substituting:

[math]\displaystyle{ \begin{array}{lcl} a \lt & x_1\beta_1 + c_{11}\eta_1 & \lt b \\ a \lt & x_2\beta_2 + c_{21}\eta_1 + c_{22}\eta_2 & \lt b \\ \vdots & \vdots & \vdots \\ a \lt & x_J\beta_J + \sum_{k=1}^J c_{J,k}\eta_k & \lt b \\ \end{array} }[/math]

Rearranging above,

[math]\displaystyle{ \begin{array}{ccc} \frac{a - x_1\beta_1}{c_{11}} & \lt \eta_1 \lt & \frac{b - x_1\beta_1}{c_{11}}\\ \frac{a - (x_2\beta_2 + c_{21}\eta_1)}{c_{22}} & \lt \eta_2 \lt & \frac{b - (x_2\beta_2 + c_{21}\eta_1)}{c_{22}} \\ \vdots & \vdots & \vdots \\ \frac{a - (x_J\beta_J + \sum_{k=1}^{J-1} c_{J,k})}{c_{J,J}} & \lt \eta_k \lt & \frac{b - (x_J\beta_J + \sum_{k=1}^{J-1} c_{J,k})}{c_{J,J}} \\ \end{array} }[/math]

Now all one needs to do is iteratively draw from the truncated univariate normal distribution with the given bounds above. This can be done by the inverse CDF method and noting the truncated normal distribution is given by,

[math]\displaystyle{ u = \frac{ \Phi( \frac{x-\mu}{\sigma}) - \Phi(\frac{a-\mu}{\sigma}) }{ \Phi(\frac{b-\mu}{\sigma}) - \Phi(\frac{a-\mu}{\sigma})} }[/math]

Where [math]\displaystyle{ u }[/math] will be a number between 0 and 1 because the above is a CDF. This suggests to generate random draws from the truncated distribution one has to solve for [math]\displaystyle{ x }[/math] giving,

[math]\displaystyle{ x = \sigma F^{-1}(u*(F(\beta) - F(\alpha)) + F(\alpha)) + \mu }[/math]

where [math]\displaystyle{ \alpha = \frac{a-\mu}{\sigma} }[/math] and [math]\displaystyle{ \beta = \frac{b-\mu}{\sigma} }[/math] and [math]\displaystyle{ F }[/math] is the standard normal CDF. With such draws one can reconstruct the [math]\displaystyle{ \mathbf{y^*_i} }[/math] by its simplified equation using the Cholesky factorization. These draws will be conditional on the draws coming before and using properties of normals the product of the conditional PDFs will be the joint distribution of the [math]\displaystyle{ \mathbf{y^*_i} }[/math],

[math]\displaystyle{ q(\mathbf{y^*_i}|\mathbf{X_1\beta}, \Sigma) = q(y^*_1|\mathbf{X_1\beta}, \Sigma)q(y^*_2|y^*_1, \mathbf{X_1\beta}, \Sigma)\dots q(y^*_J|y^*_1,\dots,y^*_{J-1},\mathbf{X_1\beta}, \Sigma) }[/math]

Where [math]\displaystyle{ q(\cdot) }[/math] is the multivariate normal distribution.

Because [math]\displaystyle{ y^*_j }[/math] conditional on [math]\displaystyle{ y_k, \ k\lt j }[/math] is restricted to the set [math]\displaystyle{ A }[/math] by the setup using the Cholesky factorization then we know that [math]\displaystyle{ q(\cdot) }[/math] is a truncated multivariate normal. The distribution function of a truncated normal is,

[math]\displaystyle{ \frac{ \phi(\frac{x-\mu}{\sigma })} {\sigma(\Phi(\frac{b-\mu}{\sigma}) - \Phi(\frac{a-\mu}{\sigma})) } }[/math]

Therefore, [math]\displaystyle{ y^*_j }[/math] has distribution,

[math]\displaystyle{ \begin{align} q(\mathbf{y^*_i} | \mathbf{X_i\beta}, \Sigma) & = \frac{ \frac{1}{c_{11}} \phi_1\Big( \frac{y^*_{j} - x_1\beta }{c_{11}}\Big)}{\Big( \Phi_1\Big( \frac{b- x_1\beta}{c_{11}} \Big) -\Phi_1\Big( \frac{a- x_1\beta}{c_{11}} \Big) \Big)}\times \dots \times \frac{\frac{1}{c_{JJ}}\phi_J\Big(\frac{y^*_J - (x_J\beta + c_{J1}\eta_1 + c_{J2}\eta_2 + \dots + c_{JJ-1} \eta_{J-1})}{c_{JJ}}\Big) }{\Big(\Phi_J \Big( \frac{b- (x_J\beta + c_{J1}\eta_1 + c_{J2}\eta_2 + \dots + c_{JJ-1} \eta_{J-1})}{c_{JJ}} \Big) - \Phi_J \Big( \frac{a- (x_J\beta + c_{J1}\eta_1 + c_{J2}\eta_2 + \dots + c_{JJ-1} \eta_{J-1}}{c_{JJ}}\Big) \Big)}\\ & = \frac{\prod_{j=1}^{J} \frac{1}{c_{jj}} \phi_j\Big( \frac{y^*_j - \sum_{k=1}^{k\lt j} c_{jk}\eta_k }{c_{jj}}\Big)}{ \prod_{j=1}^J \Big(\Phi_j \Big( \frac{b - \sum_{k=1}^{k\lt j} c_{jk}\eta_k}{c_{jj}} \Big) - \Phi\Big( \frac{a - \sum_{k=1}^{k\lt j} c_{jk}\eta_k}{c_{jj}}\Big)\Big)} \end{align} }[/math]

where [math]\displaystyle{ \phi_j }[/math] is the standard normal pdf for choice [math]\displaystyle{ j }[/math].

Because [math]\displaystyle{ y^*_{j | \{y^*_{k\lt j} \}} \sim N(\mathbf{X_i\beta} + \sum_{k=1}^{k\lt j} c_{jk}\eta_k, c_{jj}^2) }[/math] the above standardization makes each term mean 0 variance 1.

Let the denominator [math]\displaystyle{ \prod_{j=1}^J \Phi_j \Big( \frac{b - \sum_{k=1}^{k\lt j} c_{jk}\eta_k}{c_{jj}} \Big) - \Phi\Big( \frac{a - \sum_{k=1}^{k\lt j} c_{jk}\eta_k}{c_{jj}}\Big) = \prod_{j=1}^J l_{jj} }[/math] and the numerator [math]\displaystyle{ \prod_{j=1}^{J}\frac{1}{c_{jj}} \phi_j\Big( \frac{y^*_j - \sum_{k=1}^{k\lt j} c_{jk}\eta_k }{c_{jj}}\Big) = f_{N}(\mathbf{y_i^*} | \mathbf{X_i\beta}, \Sigma) }[/math] where [math]\displaystyle{ f_N(\cdot) }[/math] is the multivariate normal PDF.

Going back to the original goal, to evaluate the

[math]\displaystyle{ \begin{align} \Pr(\mathbf{y_i}|\mathbf{X_i\beta}, \Sigma) = & \int_{A_j}f_N(\mathbf{y}^*_i|\mathbf{X_i\beta}, \Sigma) dy^*_j \\ \end{align} }[/math]

Using importance sampling we can evaluate this integral,

[math]\displaystyle{ \begin{align} \Pr(\mathbf{y_i}|\mathbf{X_i\beta}, \Sigma) = & \int_{A_j}f_N(\mathbf{y}^*_i|\mathbf{X_i\beta}, \Sigma) dy^*_j \\ = &\int_{A_j} \frac{f_N(\mathbf{y}^*_i|\mathbf{X_i\beta}, \Sigma)}{ q(\mathbf{y^*_i} | \mathbf{X_i\beta}, \Sigma) } q(\mathbf{y^*_i} | \mathbf{X_i\beta}, \Sigma) dy^*_j \\ = & \int_{A_j} \frac{f_N(\mathbf{y}^*_i|\mathbf{X_i\beta}, \Sigma)}{ \frac{f_N(\mathbf{y}^*_i|\mathbf{X_i\beta}, \Sigma)}{\prod_{j=1}^J l_{jj}} } q(\mathbf{y^*_i} | \mathbf{X_i\beta}, \Sigma) dy^*_j \\ = & \mathbb{E}_{\mathbf{q}} \Big( \prod_{j=1}^J l_{jj} \Big) \\ \end{align} }[/math]

This is well approximated by [math]\displaystyle{ \frac{1}{S} \sum_{s=1}^S \prod_{j=1}^J l_{jj} }[/math].

References

  1. Hajivassiliou, Vassilis (1994). "CLASSICAL ESTIMATION METHODS FOR LDV MODELS USING SIMULATION". Handbook of econometrics. http://escholarship.org/uc/item/3cg196fr.pdf. 
  2. Train, Kenneth (2003). Discrete Choice Methods With Simulation. Cambridge University Press. 
  3. Greene, William (2003). Econometric Analysis. Prentice Hall.