% Created 2019-12-12 to 09:19
% Intended LaTeX compiler: pdflatex
\documentclass[table]{article}

%%%% settings when exporting code %%%% 

\usepackage{listings}
\lstset{
backgroundcolor=\color{white},
basewidth={0.5em,0.4em},
basicstyle=\ttfamily\small,
breakatwhitespace=false,
breaklines=true,
columns=fullflexible,
commentstyle=\color[rgb]{0.5,0,0.5},
frame=single,
keepspaces=true,
keywordstyle=\color{black},
literate={~}{$\sim$}{1},
numbers=left,
numbersep=10pt,
numberstyle=\ttfamily\tiny\color{gray},
showspaces=false,
showstringspaces=false,
stepnumber=1,
stringstyle=\color[rgb]{0,.5,0},
tabsize=4,
xleftmargin=.23in,
emph={anova,apply,class,coef,colnames,colNames,colSums,dim,dcast,for,ggplot,head,if,ifelse,is.na,lapply,list.files,library,logLik,melt,plot,require,rowSums,sapply,setcolorder,setkey,str,summary,tapply},
emphstyle=\color{blue}
}

%%%% packages %%%%%

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{textcomp}
\usepackage{color}
\usepackage{enumerate}
\usepackage{graphicx}
\usepackage{grffile}
\usepackage{wrapfig}
\usepackage{rotating}
\usepackage{longtable}
\usepackage{multirow}
\usepackage{multicol}
\usepackage{changes}
\usepackage{pdflscape}
\usepackage{geometry}
\usepackage[normalem]{ulem}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{dsfont}
\usepackage{array}
\usepackage{ifthen}
\usepackage{hyperref}
\usepackage{natbib}
\geometry{innermargin=1.5in,outermargin=1.25in,vmargin=3cm}
\linespread{1.4}
\usepackage{epstopdf} % to be able to convert .eps to .pdf image files
\renewcommand{\thefigure}{S\arabic{figure}}
\renewcommand{\thetable}{S\arabic{table}}
\renewcommand{\theequation}{S\arabic{equation}}
\usepackage{caption}
\usepackage[labelformat=simple]{subcaption}
\renewcommand{\thesubfigure}{Study \Alph{subfigure}}
\usepackage{booktabs}
\usepackage{algorithm2e}
\usepackage{amsthm}
\usepackage{amsthm,dsfont,amsmath}
\newtheorem{lemma}{Lemma}
\newcommand{\Vn}{\mathbf{n}}
\newcommand{\X}{X}
\newcommand{\VX}{\boldsymbol{X}}
\newcommand{\Y}{Y}
\newcommand{\VY}{\boldsymbol{Y}}
\newcommand{\Vy}{\boldsymbol{y}}
\newcommand{\VZ}{\boldsymbol{Z}}
\newcommand{\Veta}{\boldsymbol{\eta}}
\newcommand{\Vvarepsilon}{\boldsymbol{\varepsilon}}
\newcommand{\set}{\mathcal{S}}
\newcommand{\Vmu}{\boldsymbol{\mu}}
\newcommand{\Vxi}{\boldsymbol{\xi}}
\newcommand{\param}{\theta}
\newcommand{\paramHat}{\hat{\param}}
\newcommand{\Vparam}{\boldsymbol{\param}}
\newcommand{\VparamHat}{\boldsymbol{\paramHat}}
\newcommand\Hessian{\mathcal{H}}
\newcommand\Likelihood{\mathcal{L}}
\newcommand\Information{\mathcal{I}}
\newcommand\Score{\mathcal{U}}
\newcommand\Hypothesis{\mathcal{H}}
\newcommand\Real{\mathbb{R}}
\newcommand\half{\frac{1}{2}}
\newcommand\Ind[1]{\mathds{1}_{#1}}
\newcommand\dpartial[2]{\frac{\partial #1}{\partial #2}}
\newcommand\ddpartial[3]{\frac{\partial^2 #1}{\partial #2 \partial #3}}
\newcommand\Esp{\mathbb{E}}
\newcommand\Var{\mathbb{V}ar}
\newcommand\Cov{\mathbb{C}ov}
\newcommand\Gaus{\mathcal{N}}
\newcommand\trans[1]{{#1}^\intercal}%\newcommand\trans[1]{{\vphantom{#1}}^\top{#1}}
\newcommand{\independent}{\mathrel{\text{\scalebox{1.5}{$\perp\mkern-10mu\perp$}}}}
\RequirePackage[makeroom]{cancel}
\newcommand\Ccancelto[3][black]{\renewcommand\CancelColor{\color{#1}}\cancelto{#2}{#3}}
\newcommand\Ccancel[2][black]{\renewcommand\CancelColor{\color{#1}}\cancel{#2}}
\author{Brice Ozenne}
\date{}
\title{Likelihood, first and second order derivatives in a LVM}
\hypersetup{
 colorlinks=true,
 citecolor=[rgb]{0,0.5,0},
 urlcolor=[rgb]{0,0,0.5},
 linkcolor=[rgb]{0,0,0.5},
 pdfauthor={Brice Ozenne},
 pdftitle={Likelihood, first and second order derivatives in a LVM},
 pdfkeywords={},
 pdfsubject={},
 pdfcreator={Emacs 25.2.1 (Org mode 9.0.4)},
 pdflang={English}
 }
\begin{document}

\maketitle
In this document, we show the expression of the likelihood, its first
two derivatives, the information matrix, and the first derivative of
the information matrix.

\section{Likelihood}
\label{sec:org20faa29}

At the individual level, the measurement and structural models can be written:
\begin{align*}
\VY_i &= \nu + \Veta_i \Lambda + \VX_i K + \Vvarepsilon_i \\
\Veta_i &= \alpha + \Veta_i B + \VX_i \Gamma + \boldsymbol{\zeta}_i 
\end{align*}
\begin{tabular}{lll}
with & \(\Sigma_{\epsilon}\)   &the variance-covariance matrix of the residuals \(\Vvarepsilon_i\)\\
     & \(\Sigma_{\zeta}\) & the variance-covariance matrix of the residuals \(\boldsymbol{\zeta}_i\). \\
\end{tabular}

\bigskip

By combining the previous equations, we can get an expression for
\(\VY_i\) that does not depend on \(\Veta_i\):
\begin{align*}
\VY_i &= \nu + \left(\boldsymbol{\zeta}_i + \alpha + \VX_i \Gamma \right) (I-B)^{-1} \Lambda + \VX_i K + \Vvarepsilon_i 
\end{align*}
Since \(\Var[Ax] = A \Var[x] \trans{A}\) we have \(\Var[xA] =
\trans{A} \Var[x] A\), we have the following expressions for the
conditional mean and variance of \(\VY_i\):
\begin{align*}
 \Vmu(\Vparam,\VX_i) &= E[\VY_i|\VX_i] = \nu + (\alpha + \VX_i \Gamma) (1-B)^{-1} \Lambda + \VX_i K \\
\Omega(\Vparam) &= Var[\VY_i|\VX_i] = \Lambda^t (1-B)^{-t}  \Sigma_{\zeta} (1-B)^{-1} \Lambda + \Sigma_{\varepsilon} 
\end{align*}

\bigskip

where \(\Vparam\) is the collection of all parameters. The
log-likelihood can be written:
\begin{align*}
l(\Vparam|\VY,\VX) &= \sum_{i=1}^n l(\Vparam|\VY_i,\VX_i) \\
&= \sum_{i=1}^{n} - \frac{p}{2} log(2\pi) - \frac{1}{2} log|\Omega(\Vparam)| - \frac{1}{2} (\VY_i-\Vmu(\Vparam,\VX_i)) \Omega(\Vparam)^{-1} \trans{(\VY_i-\Vmu(\Vparam,\VX_i))}
\end{align*}

\section{Partial derivative for the conditional mean and variance}
\label{sec:orgef944c3}

In the following, we denote by \(\delta_{\sigma \in \Sigma}\) the
indicator matrix taking value 1 at the position of \(\sigma\) in the
matrix \(\Sigma\). For instance:
\begin{align*}
\Sigma =
\begin{bmatrix}
 \sigma_{1,1} & \sigma_{1,2} & \sigma_{1,3} \\
 \sigma_{1,2} & \sigma_{2,2} & \sigma_{2,3} \\
 \sigma_{1,3} & \sigma_{2,3} & \sigma_{3,3} \\
\end{bmatrix}
 \qquad 
\delta_{\sigma_{1,2} \in \Sigma} =
\begin{bmatrix}
0 & 1 & 0 \\
1 & 0 & 0 \\
0 & 0 & 0 \\
\end{bmatrix}
\end{align*}
The same goes for \(\delta_{\lambda \in \Lambda}\), \(\delta_{b \in
B}\), and \(\delta_{\psi \in \Psi}\). 

\bigskip

First order derivatives:
\begin{align*}
 \frac{\partial \Vmu(\Vparam,\VX_i)}{\partial \nu} &= 1 \\
 \frac{\partial \Vmu(\Vparam,\VX_i)}{\partial K} &= \VX_i \\
 \frac{\partial \Vmu(\Vparam,\VX_i)}{\partial \alpha} &= (1-B)^{-1}\Lambda \\
 \frac{\partial \Vmu(\Vparam,\VX_i)}{\partial \Gamma} &= \VX_i(1-B)^{-1}\Lambda \\
 \frac{\partial \Vmu(\Vparam,\VX_i)}{\partial \lambda} &= (\alpha + \VX_i \Gamma)(1-B)^{-1}\delta_{\lambda \in \Lambda} \\
 \frac{\partial \Vmu(\Vparam,\VX_i)}{\partial b} &= (\alpha + \VX_i \Gamma)(1-B)^{-1}\delta_{b \in B}(1-B)^{-1}\Lambda \\
 &\\
 \frac{\partial \Omega(\Vparam)}{\partial \psi} &= \Lambda^t (1-B)^{-t} \delta_{\psi \in \Psi} (1-B)^{-1} \Lambda \\
 \frac{\partial \Omega(\Vparam)}{\partial \sigma} &= \delta_{\sigma \in \Sigma} \\
 \frac{\partial \Omega(\Vparam)}{\partial \lambda} &= \delta_{\lambda \in \Lambda}^t (1-B)^{-t} \Psi (1-B)^{-1} \Lambda + \Lambda^t (1-B)^{-t} \Psi (1-B)^{-1} \delta_{\lambda \in \Lambda} \\
 \frac{\partial \Omega(\Vparam)}{\partial b} &= \Lambda^t (1-B)^{-t} \delta_{b \in B}^t (1-B)^{-t} \Psi (1-B)^{-1} \Lambda + \Lambda^t (1-B)^{-t} \Psi (1-B)^{-1} \delta_{b \in B} (1-B)^{-1} \Lambda\\
\end{align*}

Second order derivatives:
\begin{align*}
 \frac{\partial^2 \Vmu(\Vparam,\VX_i)}{\partial \alpha \partial b} &= \delta_{\alpha} (1-B)^{-1} \delta_{b \in B} (1-B)^{-1} \Lambda \\
 \frac{\partial^2 \Vmu(\Vparam,\VX_i)}{\partial \alpha \partial \lambda} &= \delta_{\alpha} (1-B)^{-1} \delta_{\lambda \in \Lambda} \\
 \frac{\partial^2 \Vmu(\Vparam,\VX_i)}{\partial \Gamma \partial b} &= \VX_i (1-B)^{-1} \delta_{b \in B} (1-B)^{-1} \Lambda \\
 \frac{\partial^2 \Vmu(\Vparam,\VX_i)}{\partial \Gamma \partial \lambda} &= \VX_i (1-B)^{-1} \delta_{\lambda \in \Lambda} \\
 \frac{\partial^2 \Vmu(\Vparam,\VX_i)}{\partial \lambda \partial b } &=  (\alpha + \VX_i \Gamma)(1-B)^{-1} \delta_{b \in B} (1-B)^{-1} \delta_{\lambda \in \Lambda} \\
 \frac{\partial^2 \Vmu(\Vparam,\VX_i)}{\partial b \partial b'} &= (\alpha + \VX_i \Gamma)(1-B)^{-1}\delta_{b' \in B}(1-B)^{-1}\delta_{b \in B}(1-B)^{-1}\Lambda \\
& + (\alpha + \VX_i \Gamma)(1-B)^{-1}\delta_{b \in B}(1-B)^{-1}\delta_{b' \in B}(1-B)^{-1}\Lambda  \\
& \\
 \frac{\partial^2 \Omega(\Vparam)}{\partial \psi \partial \lambda} &=  \delta_{\lambda \in \Lambda}^t (1-B)^{-t} \delta_{\psi \in \Psi} (1-B)^{-1} \Lambda  \\
& + \Lambda^t (1-B)^{-t} \delta_{\psi \in \Psi} (1-B)^{-1} \delta_{\lambda \in \Lambda}  \\
 \frac{\partial^2 \Omega(\Vparam)}{\partial \psi \partial b} &= \Lambda^t (1-B)^{-t} \delta^t_{b \in B} (1-B)^{-t} \delta_{\psi \in \Psi} (1-B)^{-1} \Lambda \\
& + \Lambda^t (1-B)^{-t} \delta_{\psi \in \Psi} (1-B)^{-1} \delta_{b \in B} (1-B)^{-1} \Lambda  \\
 \frac{\partial^2 \Omega(\Vparam)}{\partial \lambda \partial b} &= \delta_{\lambda \in \Lambda}^t (1-B)^{-t} \delta^t_{b \in B} (1-B)^{-t} \Psi (1-B)^{-1} \Lambda \\
& + \delta_{\lambda \in \Lambda}^t (1-B)^{-t} \Psi (1-B)^{-1} \delta^t_{b \in B} (1-B)^{-1} \Lambda \\
& + \Lambda^t (1-B)^{-t} \delta^t_{b \in B} (1-B)^{-t} \Psi (1-B)^{-1} \delta_{\lambda \in \Lambda} \\
& + \Lambda^t (1-B)^{-t}  \Psi (1-B)^{-1} \delta^t_{b \in B} (1-B)^{-1} \delta_{\lambda \in \Lambda}  \\
 \frac{\partial^2 \Omega(\Vparam)}{\partial \lambda \partial \lambda'} &= \delta_{\lambda \in \Lambda}^t (1-B)^{-t} \Psi (1-B)^{-1} \delta_{\lambda' \in \Lambda} \\
& + \delta_{\lambda' \in \Lambda}^t (1-B)^{-t} \Psi (1-B)^{-1} \delta_{\lambda \in \Lambda}   \\
 \frac{\partial^2 \Omega(\Vparam)}{\partial b \partial b'} &= \Lambda^t (1-B)^{-t} \delta_{b' \in B}^t (1-B)^{-t} \delta_{b \in B}^t (1-B)^{-t} \Psi (1-B)^{-1} \Lambda \\
& + \Lambda^t (1-B)^{-t} \delta_{b \in B}^t (1-B)^{-t} \delta_{b' \in B}^t (1-B)^{-t} \Psi (1-B)^{-1} \Lambda \\
& + \Lambda^t (1-B)^{-t} \delta_{b \in B}^t (1-B)^{-t} \Psi (1-B)^{-1} \delta_{b' \in B} (1-B)^{-1} \Lambda \\
& + \Lambda^t (1-B)^{-t} \delta_{b' \in B}^t (1-B)^{-t} \Psi (1-B)^{-1} \delta_{b \in B} (1-B)^{-1} \Lambda \\
& + \Lambda^t (1-B)^{-t} \Psi (1-B)^{-1} \delta_{b' \in B} (1-B)^{-1} \delta_{b \in B} (1-B)^{-1} \Lambda \\
& + \Lambda^t (1-B)^{-t} \Psi (1-B)^{-1} \delta_{b \in B} (1-B)^{-1} \delta_{b' \in B} (1-B)^{-1} \Lambda \\
\end{align*}
\section{First derivative: score}
\label{sec:orga852a0f}
The individual score is obtained by derivating the log-likelihood:
\begin{align*}
   \Score(\param|\VY_i,\VX_i) =& \dpartial{l_i(\Vparam|\VY_i,\VX_i)}{\param}\\
 =& - \frac{1}{2} tr\left(\Omega(\Vparam)^{-1} \dpartial{\Omega(\Vparam)}{\param}\right) \\
 &+  \dpartial{\Vmu(\Vparam,\VX_i)}{\param} \Omega(\Vparam)^{-1} \trans{(\VY_i-\Vmu(\Vparam,\VX_i))} \\
 &+ \frac{1}{2} (\VY_i-\Vmu(\Vparam,\VX_i)) \Omega(\Vparam)^{-1} \dpartial{\Omega(\Vparam)}{\param} \Omega(\Vparam)^{-1} \trans{(\VY_i-\Vmu(\Vparam,\VX_i))}
\end{align*}

\section{Second derivative: Hessian and expected information}
\label{SM:Information}
The individual Hessian is obtained by derivating twice the
log-likelihood:
\begin{align*}
   \Hessian_i(\param,\param') =& -\frac{1}{2} tr\left(-\Omega(\Vparam)^{-1} \dpartial{\Omega(\Vparam)}{\param'} \Omega(\Vparam)^{-1} \frac{\partial \Omega(\Vparam)}{\partial \param} + \Omega(\Vparam)^{-1} \frac{\partial^2 \Omega(\Vparam)}{\partial \param \partial \param'}\right) \\
 &+  \frac{\partial^2 \Vmu(\Vparam,\VX_i)}{\partial \param \partial \param'} \Omega(\Vparam)^{-1} \trans{(\VY_i-\Vmu(\Vparam,\VX_i))} \\
 &-  \dpartial{\Vmu(\Vparam,\VX_i)}{\param} \Omega(\Vparam)^{-1} \dpartial{\Omega(\Vparam)}{\param'} \Omega(\Vparam)^{-1} \trans{(\VY_i-\Vmu(\Vparam,\VX_i))} \\
 &-  \dpartial{\Vmu(\Vparam,\VX_i)}{\param} \Omega(\Vparam)^{-1} \trans{\dpartial{\Vmu(\Vparam,\VX_i)}{\param'}} \\
 &-  \dpartial{\Vmu(\Vparam,\VX_i)}{\param'} \Omega(\Vparam)^{-1} \dpartial{\Omega(\Vparam)}{\param} \Omega(\Vparam)^{-1} \trans{(\VY_i-\Vmu(\Vparam,\VX_i))}  \\
 &-  (\VY_i-\Vmu(\Vparam,\VX_i)) \Omega(\Vparam)^{-1} \dpartial{\Omega(\Vparam)}{\param'} \Omega(\Vparam)^{-1} \frac{\partial \Omega(\Vparam)}{\partial \param} \Omega(\Vparam)^{-1} \trans{(\VY_i-\Vmu(\Vparam,\VX_i))} \\
 &+ \frac{1}{2} (\VY_i-\Vmu(\Vparam,\VX_i)) \Omega(\Vparam)^{-1} \frac{\partial^2 \Omega(\Vparam)}{\partial \param \partial \param'} \Omega(\Vparam)^{-1} \trans{(\VY_i-\Vmu(\Vparam,\VX_i))} \\
\end{align*}

\clearpage

Using that \(\Vmu(\param,\VX_i)\) and \(\Omega(\Vparam)\) are deterministic quantities,
we can then take the expectation to obtain:
\begin{align*}
\Esp\left[\Hessian_i(\param,\param')\right] =& -\frac{1}{2} tr\left(-\Omega(\Vparam)^{-1} \dpartial{\Omega(\Vparam)}{\param'} \Omega(\Vparam)^{-1} \frac{\partial \Omega(\Vparam)}{\partial \Vparam} + \Omega(\param)^{-1} \frac{\partial^2 \Omega(\Vparam)}{\partial \param \partial \param'}\right) \\
 &+  \frac{\partial^2 \Vmu(\Vparam,\VX_i)}{\partial \param \partial \param'} \Omega(\Vparam)^{-1} \Ccancelto[red]{0}{\Esp\left[\trans{(\VY_i-\Vmu(\Vparam,\VX_i))}\right]} \\
 &-  \dpartial{\Vmu(\Vparam,\VX_i)}{\param} \Omega(\Vparam)^{-1} \dpartial{\Omega(\Vparam)}{\param'} \Omega(\Vparam)^{-1} \Ccancelto[red]{0}{\Esp\left[\trans{(\VY_i-\Vmu(\Vparam,\VX_i))}\right]} \\
 &-  \dpartial{\Vmu(\Vparam,\VX_i)}{\param} \Omega(\Vparam)^{-1} \trans{\dpartial{\Vmu(\Vparam)}{\param'}} \\
 &-  \dpartial{\Vmu(\Vparam,\VX_i)}{\param'} \Omega(\Vparam)^{-1} \dpartial{\Omega(\Vparam)}{\param} \Omega(\Vparam)^{-1} \Ccancelto[red]{0}{\Esp\left[\trans{(\VY_i-\Vmu(\Vparam,\VX_i))}\right]}  \\
 &-  \Esp\left[(\VY_i-\Vmu(\Vparam,\VX_i)) \Omega(\Vparam)^{-1} \dpartial{\Omega(\Vparam)}{\param'} \Omega(\Vparam)^{-1} \frac{\partial \Omega(\Vparam)}{\partial \param} \Omega(\Vparam)^{-1} \trans{(\VY_i-\Vmu(\Vparam,\VX_i))}\right] \\
 &+ \Esp \left[\frac{1}{2} (\VY_i-\Vmu(\Vparam,\VX_i)) \Omega(\Vparam)^{-1} \frac{\partial^2 \Omega(\Vparam)}{\partial \param \partial \param'} \Omega(\Vparam)^{-1} \trans{(\VY_i-\Vmu(\Vparam,\VX_i))}\right] \\
\end{align*}

The last two expectations can be re-written using that \(\Esp[\trans{x}Ax] = tr\left(A\Var[x]\right)+\trans{\Esp[x]}A\Esp[x]\):
\begin{align*}
\Esp\left[\Hessian_i(\param,\param')\right] =& -\frac{1}{2} tr\left(-\Omega(\Vparam)^{-1} \dpartial{\Omega(\Vparam)}{\param'} \Omega(\Vparam)^{-1} \frac{\partial \Omega(\Vparam)}{\partial \param} + \Ccancel[red]{\Omega(\Vparam)^{-1} \frac{\partial^2 \Omega(\Vparam)}{\partial \param \partial \param'}}\right) \\
 &-  \frac{\partial \Vmu(\Vparam,\VX_i)}{\partial \param} \Omega(\Vparam)^{-1} \trans{\frac{\partial \Vmu(\Vparam,\VX_i)}{\partial \param'}} \\
 &- tr\left(\Omega(\Vparam)^{-1} \frac{\partial \Omega(\Vparam)}{\partial \param'} \Omega(\Vparam)^{-1} \frac{\partial \Omega(\Vparam)}{\partial \param} \Omega(\Vparam)^{-1} \trans{\left(\Var\left[\VY_i-\Vmu(\Vparam,\VX_i)\right]\right)} \right) \\
 &+ \Ccancel[red]{\frac{1}{2} tr\left( \Omega(\Vparam)^{-1} \frac{\partial^2 \Omega(\Vparam)}{\partial \param \partial \param'} \Ccancel[blue]{\Omega(\Vparam)^{-1}} \Ccancel[blue]{\trans{\left(\Var\left[\VY_i-\Vmu(\Vparam,\VX_i)\right]\right)}} \right)} \\
\end{align*}
where we have used that \(\Var\left[\VY_i-\Vmu(\Vparam,\VX_i)\right] =
\Var\left[\VY_i|\VX_i\right] = \Omega(\Vparam)\). Finally we get:
\begin{align*}
\Esp\left[\Hessian_i(\param,\param')\right] =& -\frac{1}{2} tr\left(\Omega(\Vparam)^{-1} \dpartial{\Omega(\Vparam)}{\param'} \Omega(\Vparam)^{-1} \dpartial{\Omega(\Vparam)}{\param}\right) \\
 &-  \dpartial{\Vmu(\Vparam,\VX_i)}{\param} \Omega(\Vparam)^{-1} \trans{\dpartial{\Vmu(\Vparam,\VX_i)}{\param'}} \\
\end{align*}
So we can deduce from the previous equation the expected information matrix:
\begin{align*}
\Information(\param,\param') =& \frac{n}{2} tr\left(\Omega(\Vparam)^{-1} \dpartial{\Omega(\Vparam)}{\param'} \Omega(\Vparam)^{-1} \frac{\partial \Omega(\Vparam)}{\partial \param}\right) 
 + \sum_{i=1}^n \dpartial{\Vmu(\Vparam,\VX_i)}{\param} \Omega(\Vparam)^{-1} \trans{\dpartial{\Vmu(\Vparam,\VX_i)}{\param'}}
\end{align*}

\section{First derivatives of the information matrix}
\label{sec:org27a8d69}
\begin{align*}
\frac{\partial \Information(\param,\param')}{\partial \param''} 
=& - \frac{n}{2} tr\left(\Omega(\Vparam)^{-1} \frac{\partial \Omega(\Vparam)}{\partial \param''} \Omega(\Vparam)^{-1} \frac{\partial \Omega(\Vparam)}{\partial \param} \Omega(\Vparam)^{-1} \frac{\partial \Omega(\Vparam)}{\partial \param'}\right) \\
& + \frac{n}{2} tr\left( \Omega(\Vparam)^{-1} \frac{\partial^2 \Omega(\Vparam)}{\partial\param\partial\param''} \Omega(\Vparam)^{-1} \frac{\partial \Omega(\Vparam)}{\partial \param'}\right) \\
& - \frac{n}{2} tr\left(\Omega(\Vparam)^{-1} \frac{\partial \Omega(\Vparam)}{\partial \param} \Omega(\Vparam)^{-1} \frac{\partial \Omega(\Vparam)}{\partial \param''} \Omega(\Vparam)^{-1} \frac{\partial \Omega(\Vparam)}{\partial \param'}\right) \\
& + \frac{n}{2} tr\left( \Omega(\Vparam)^{-1} \frac{\partial \Omega(\Vparam)}{\partial\param} \Omega(\Vparam)^{-1} \frac{\partial^2 \Omega(\Vparam)}{\partial \param' \partial \param''}\right) \\
& + \sum_{i=1}^n \frac{\partial^2 \Vmu(\Vparam,\VX_i)}{\partial\param\partial\param''} \Omega(\Vparam)^{-1} \trans{\dpartial{\Vmu(\Vparam,\VX_i)}{\param'}} \\
& + \sum_{i=1}^n \frac{\partial \Vmu(\Vparam,\VX_i)}{\partial \param} \Omega(\Vparam)^{-1} \trans{\ddpartial{\Vmu(\Vparam,\VX_i)}{\Vparam'}{\param''}} \\
& - \sum_{i=1}^n \frac{\partial \Vmu(\Vparam,\VX_i)}{\partial \param} \Omega(\Vparam)^{-1} \frac{\partial \Omega(\Vparam)}{\partial \param''} \Omega(\Vparam)^{-1} \trans{\dpartial{\Vmu(\Vparam,\VX_i)}{\param'}} \\
\end{align*}
\end{document}