Produce negative log-likelihood in the GMM case
loglikelihood_GMM(theta, rho_GMMpar, alpha_GMMpar, sigma2_GMMpar, n_alpha,
X_mat, Y_mat, Z_mat, W, T, N, aux_Y0)
vector of homogeneous parameters
lagged dependent variables coefficient estimates from the GMM
external variables coefficient estimates from the GMM
variance of the shocks estimated using GMM residuals
number of external variables
lagged dependent variable matrix
dependent variable matrix
external variable matrix
cross-sectionally invariant variables - not used now
time dimension of the data
cross-sectional dimension of the data
auxiliary matrix with initial observations of the dependent variable