Error with Type-B Model #162
Replies: 5 comments 12 replies
-
Can you provide an image and or file containing your design matrix?
Sent from iPhone
Kendrick Kay
…On Tue, Dec 3, 2024 at 6:00 AM nbabaee ***@***.***> wrote:
Hello,
I have an event-related experiment with 96 conditions (I also have random
null trials in each run and I considered it as a condition). each subject
completed 10 runs with 148 trials. I made a 148*97 design matrix for each
run. when I run Type_B Model I receive the following error:
*** FITTING TYPE-B MODEL (FITHRF) ***
working on chunk 1 of 1.
Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 1.777872e-18.
In olsmatrix2 (line 67)
In GLMestimatemodel>fitmodel_helper (line 823)
In GLMestimatemodel (line 419)
In GLMestimatesingletrial (line 926)
In Untitled2 (line 15)
Error using olsmatrix2 (line 68)
Matrix is close to singular or badly scaled. Results may be inaccurate.
RCOND = 1.777872e-18.
Error in GLMestimatemodel>fitmodel_helper (line 823)
f = mtimescell(olsmatrix2(cat(1,design{:}),opt.lambda),data2); %
conditions x voxels
Error in GLMestimatemodel (line 419)
[results{1},hrffitvoxels,cache] = ...
Error in GLMestimatesingletrial (line 926)
results0 = GLMestimatemodel(designSINGLE,cellfun(@(x)
x(chunks{z},:,:,:),data,'UniformOutput',0), ...
I have tried GLMsingle with several changes in my data for example
considering just one slice of volume image but I still get this error and
it seems that the problem is with the design matrix.
I would appreciate it if you could guide me.
—
Reply to this email directly, view it on GitHub
<#162>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAU2DEX3GDPQQQOZ342KNEL2DTC55AVCNFSM6AAAAABS4JTLFGVHI2DSMVQWIX3LMV43ERDJONRXK43TNFXW4OZXGYYDAMRTGI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Here is the image of the first run design matrix Thanks |
Beta Was this translation helpful? Give feedback.
-
Also, are you sure you intend to code every new volume as corresponding to a new trial? That is a very aggressive design matrix and will be extremely challenging to estimate well. |
Beta Was this translation helpful? Give feedback.
-
I looked at the figures. Take a look at runwiseFIR.png. The FIR estimates are delayed relative to the library. This means that something is a bit off. EIther you have a temporal offset bug (such that your stimuli actually start earlier than you coded them). Or, what did you specify for ? We now know the source of you were seeing in terms of the HRFindex being highly uniform ---> the data reallly "wants" a highly delayed HRF and so it makes sense that it is picking like the very last HRF (the most delayed one). (Also, it looks like your TR is 3 s?) |
Beta Was this translation helpful? Give feedback.
-
I looked at the figures. I don't think there is a problem. The signal strength is a bit weak, but that may be unavoidable given your experiment and long TR. The dmetric* figures and onoffR2 figures do indicate substantial signals, so that's good |
Beta Was this translation helpful? Give feedback.
-
Hello,
I have an event-related experiment with 96 conditions (I also have random null trials in each run and I considered it as a condition). each subject completed 10 runs with 148 trials. I made a 148*97 design matrix for each run. when I run Type_B Model I receive the following error:
*** FITTING TYPE-B MODEL (FITHRF) ***
working on chunk 1 of 1.
Warning: Matrix is close to singular or badly scaled. Results may be
inaccurate. RCOND = 1.777872e-18.
Error in GLMestimatemodel>fitmodel_helper (line 823)
f = mtimescell(olsmatrix2(cat(1,design{:}),opt.lambda),data2); %
conditions x voxels
Error in GLMestimatemodel (line 419)
[results{1},hrffitvoxels,cache] = ...
Error in GLMestimatesingletrial (line 926)
results0 = GLMestimatemodel(designSINGLE,cellfun(@(x)
x(chunks{z},:,:,:),data,'UniformOutput',0), ...
I have tried GLMsingle with several changes in my data for example considering just one slice of volume images but I still get this error and it seems that the problem is with the design matrix.
I would appreciate it if you could guide me.
Beta Was this translation helpful? Give feedback.
All reactions