Autocorrelated gaussian random effects can be specified in terms of their covariance matrix, or in terms of the precision matrix (i.e. inverse covariance matrix). In a pre-processing step, spaMM may assess whether such precision matrices are sparse but the correlation matrix is dense, and if so, it may use “sparse-precision” algorithms efficient for this case. However this assessment takes times and is not systematically performed. Instead, some fast heuristics are used (see Details).
The default selection (or not) of sparse-precision methods may not always be optimal, and may be overcome by using control.HLfit=list(sparse_precision= <TRUE|FALSE>)
(control.HLfit
argument of fitting function) or spaMM.options(sparse_precision= <TRUE|FALSE>)
. This control may also be useful in other cases, notably when a large corrMatrix
is specified and either (1) you know whether the precision matrix will be sparse (in that case, it might even be better to specify the precision matrix directly), or dense;
or (2) the correlation matrix is nearly singular so that computation of its inverse fails. This may occur if the model is poorly specified, but also occurs sometimes for valid correlation models because inversion of large matrices though Cholesky methods is not numerically accurate enough. In the latter case, you may be directed to this documentation by an error message, and specifying sparse_precision= FALSE
may be useful.