thank you for this nice package! I am running a few analyses with the extraregressors option. I am consistently getting collinearity errors when the final model is computed (see below). No collinearity problem arises during the preceding steps.
For the moment I am adding motion regressors. However, the goal is to turn off completely the default detrending regressors and substitute them with a DCT basis for compatibility with SPM.
PROBLEMS WITH REGRESSORS COLLINEARITY WHEN EXTRAREGRESSORS INCLUDED
HRFMODEL = 'optimize'; WANTPARAMETRIC = 0 or 1;
*** GLMdenoisedata: calculating parametric fits and error estimates. ***
Error using olsmatrix2 (line 56)
Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 3.936974e-08.
Error in GLMdenoisedata (line 896)
mtimescell(olsmatrix2(results.parametric.designmatrix), ...
hrfmodel = 'assume'; wantparametric = 0/1;
*** GLMdenoisedata: calculating denoised data and PC weights. ***
Error using olsmatrix2 (line 56)
Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 3.254563e-08.
SAME PROBLEM WITH NO HRF OPTIMIZATION.
HRFMODEL = 'assume'; WANTPARAMETRIC = 0 or 1;
Error in GLMdenoisedata (line 956)
h = olsmatrix2(cat(2,polymatrix,exmatrix,pcmatrix))*squish(data{p} - modelcomponent,dimdata)'; % parameters x voxels
AFTER COMMENTING LINES 934/986 TO PREVENT COMPUTATION OF FINAL MODEL
HRFMODEL='optimize' or 'assume'; WANTPARAMETRIC=1;
*** GLMdenoisedata: calculating parametric fits and error estimates. ***
895 results.parametric.parameters = ...
Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 3.936974e-08.
> In olsmatrix2 (line 55)
In GLMdenoisedata (line 896)
Error using olsmatrix2 (line 56)
Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 3.936974e-08.
Error in GLMdenoisedata (line 896)
mtimescell(olsmatrix2(results.parametric.designmatrix), ...