Indefinite integral | How to compute the second-order partial derivatives of Mixed (2 gaussian & 2 binary) Gaussian Copula?

76 Views Asked by At

This is a problem about "Computing the Mixture Gaussian Copula with 2 normal (continuous) variables and 2 binary (discrete) variables".

Problem background

I have two continuous r.v. and two discrete (Bernoulli) r.v.. I want to derive the likelihood of these r.v. Song (2009) introduced a general form of this likelihood:

When the $n$ margins appear to be mixed outcomes, say, the first $n_1$ margins being continuous and the rest $n_2=n-n_1$ margins being discrete, the joint density function is given as follows. Let $\mathbf{u}=\left(\mathbf{u}_1^T, \mathbf{u}_2^T\right)^T$, with $\mathbf{u}_1=\left(u_1, \ldots, u_{n_1}\right)^T$ and $\mathbf{u}_2=\left(u_{n_1+1}, \ldots, u_n\right)^T$. The same partition and notation are applied for vectors $\mathbf{x}$ and $\mathbf{q}$. Let \begin{align} & C_1^{n_1}\left(\mathbf{u}_1, \mathbf{u}_2 \mid \Gamma\right)=\frac{\partial^{n_1}}{\partial u_1 \cdots \partial u_{n_1}} C\left(u_1, \ldots, u_n \mid \Gamma\right) \\ & \quad=(2 \pi)^{-\frac{n_2}{2}}|\Gamma|^{-\frac{1}{2}} \times \int_{-\infty}^{\Phi^{-1}\left(u_{n_1+1}\right)} \cdots \int_{-\infty}^{\Phi^{-1}\left(u_n\right)} \exp \left\{-\frac{1}{2}\left(\mathbf{q}_1^T, \mathbf{x}_2^T\right) \Gamma^{-1}\left(\mathbf{q}_1^T, \mathbf{x}_2^T\right)^T+\frac{1}{2} \mathbf{q}_1^T \mathbf{q}_1\right\} d \mathbf{x}_2 \end{align} The second formula is specific for Gaussian copula.
Then, the joint density is given by \begin{align} f(\mathbf{y})= & \prod_{j=1}^{n_1} f_j\left(y_j\right) \sum_{j_{n_1+1}=1}^2 \cdots \sum_{j_n=1}^2(-1)^{j_{n_1+1}+\ldots+j_n} \times C_1^{n_1}\left(F_1\left(y_1\right), \ldots, F_{n_1}\left(y_{n_1}\right), u_{n_1+1, j_{n_1+1}}, \ldots, u_{n, j_n} \mid \Gamma\right), \end{align}

My problem is $u_1=u_2=2$ in the above formula. This paper gave an example with $u_1=u_2=1$, which is also considerd in this post.

... There are two response variables, of which the severity of burn injury by $y_1$ is continuous and the disposition of death $y_2$ is binary: \begin{align} f\left(y_1, y_2\right)= \begin{cases}\phi\left(y_1 ; \mu_1, \varphi_1\right)\left\{1-C_1^*\left(\mu_2, z_1 \mid \alpha\right)\right\}, & \text { if } y_2=0 \\ \phi\left(y_1 ; \mu_1, \varphi_1\right) C_1^*\left(\mu_2, z_1 \mid \alpha\right), & \text { if } y_2=1\end{cases} \end{align} where $\phi\left(\cdot ; \mu_1, \varphi_1\right)$ is the density of $N\left(\mu_1, \varphi_1\right), z_1=\left(y_1-\mu_1\right) /$ $\sqrt{\varphi_1}$, and {$C_1^*(a, b \mid \alpha)=\Phi\left(\frac{\Phi^{-1}(a)-\alpha b}{\sqrt{1-\alpha^2}}\right)$}.

My problem

I'm dealing with the problem with two continous r.v. and two discrete r.v. Therefore, I need to find $\frac{\partial^{2}}{\partial u_1 \partial u_{2}} C\left(u_1,u_2,u_3,u_4\mid \Gamma\right) =\frac{\partial^{n_1}}{\partial u_1 \partial u_{2}} \Phi (\phi^{-1}(u_1), \cdots, \phi^{-1}(u_4)\mid \Gamma)\\$, which is a partial derivative of the CDF of multivariate gaussian: \begin{align} (2 \pi)|\Gamma|^{-\frac{1}{2}} \times \int_{-\infty}^{\Phi^{-1}\left(u_{3}\right)} \int_{-\infty}^{\Phi^{-1}\left(u_4\right)} \exp \left\{-\frac{1}{2}\left(u_1,u_2,s_3,s_4\right) \Gamma^{-1}\left(u_1,u_2,s_3,s_4\right)^T+\frac{1}{2} (u_1,u_2) (u_1,u_2)^T\right\} d {s}_3 d {s}_4 \end{align} As long as we can convert this integral into the form of $C^*$ in Example of Song (2009) (above one), we can calculate the joint density. For this integral, I extract the constant, so we only need to calculate: \begin{align} \int_{-\infty}^{\Phi^{-1}\left(u_{3}\right)} \int_{-\infty}^{\Phi^{-1}\left(u_4\right)} \exp \left\{-\frac{1}{2}\left(u_1,u_2,s_3,s_4\right) \Gamma^{-1}\left(u_1,u_2,s_3,s_4\right)^T\right\} d {s}_3 d {s}_4 \end{align} However, I don't know how to proceed. I tried to decompose the $\Gamma^{-1}$ into $UDU^\top$, but finally I got an integral of multiplication of four gaussian kernels which is not separable.

Could you please help me to solve this integral? OR any suggestion on other methods to derive the Mixture Gaussian Copula for two continuous r.v. and two discrete r.v.? Many thanks for you valuable aid !

Another reference that may help you to solve this problem:

Peter X.-K. Song Correlated Data Analysis: Modeling, Analytics, and Application