By default, fitting functions in spaMM
check the rank of the design matrix for fixed effects, as stats::lm
or stats::glm
do (but not, say, nlme::lme
). This computation can be quite long.
To save time when fitting different models with the same fixed-effect terms to the same data,
the result of the check can be extracted from a return object by get_rankinfo()
,
and can be provided as argument control.HLfit$rankinfo
to another fit. Alternatively, the check will not be performed if
control.HLfit$rankinfo
is set to NA
.
get_rankinfo(object)
An object of class HLfit
, as returned by the fitting functions in spaMM
.
A list with elements rank
, whichcols
(a set of columns that define a non-singular matrix), and method
(identifying the algorithm used).
The check is performed by a call to qr()
methods for either dense or sparse matrices.
If the design matrix is singular, a set of columns from the design matrix that define a non-singular matrix is identified. Note that different sets may be identified by sparse- and dense-matrix qr
methods.