This returns the negative of the expected log-likelihood function.
GLMEM_objfn(theta, spde, model_data, Psi, K, A, num.threads = NULL, Ns = NULL)
A scalar value for the negative expected log-likelihood
a vector containing kappa2, phi, and sigma2, in that order
the spde object
the model_data object containing y
and X
a conversion matrix (N by V) (or N by n)
number of covariates
The value for Matrix::crossprod(X%*%Psi) (saves time on computation)
Needed for SQUAREM (it is an argument to the fixed-point functions)
The number of samples used to approximate traces using the Hutchinson estimator. If set to 0, the exact trace is found.