Problem
Given $n$ known vectors $y_j = (y_1, y_2, ..., y_{K_j})', \forall j=1,n$ and a constant $K$; determine three vectors ($\alpha, \beta, \theta^2)$ that maximise:
$$ \text{T} (\alpha, \beta, \theta^2) = \sum\limits_{j=1}^{n} [\log(\det \Omega) + (y_j - \alpha)'\Omega^{-1}(y_j - \alpha)] $$
where $\alpha = (\alpha_1, \alpha_2, ..., \alpha_{K_j})'$, $\beta = (\beta_1, \beta_2, ..., \beta_{K_j})'$ and $\theta^2 = (\theta^2_1, \theta^2_2, ..., \theta^2_{K_j})'$; $\text{B}$, $\Theta$ and $\Omega$ are three $K_j \times K_j$ matrices as: $$\text{B} = \begin{bmatrix} \beta_1 & 0 & ... & 0 & 0 \\ 0 & \beta_2 & ... & 0 & 0 \\ ... & ... & ... & ... & ... \\ 0 & 0 & ... & 0 & \beta_{K_j} \end{bmatrix}$$ $$ \Theta = \begin{bmatrix} \theta^2_1 & 0 & ... & 0 & 0 \\ 0 & \theta^2_2 & ... & 0 & 0 \\ ... & ... & ... & ... & ... \\ 0 & 0 & ... & 0 & \theta^2_{K_j} \end{bmatrix} $$ $$ \Omega = \beta \beta' + B \Theta B' $$
Application
This maximisation is used to solve the Unobserved Component Models. I happen to know that if $\beta_i \beta_j = 0$ then Stata can run GLS to maximise $\text{T}$ given the $n$ vectors $y_j$.
In a general case, I am not aware of any mathematical/statistical programme that can yield/perform the algorithm to maximise $\text{T}$. If anyone happens to come across this type of problem, please let me know too.
I am from economics major and just want to understand the algorithms behind the maximum-likelihood estimators. I find this problem from a working paper of the World Bank and attempt to tackle.
Thank you!