Hello Aaron,
I am trying to fix an invalid posthoc contrast error and found this post referencing the exact error I am receiving. Did you find a solution to this person’s problem? My I.mat and glmFF2 script (I’ve tried glmFF4 as well) are attached but below is the error and a few notes on the most relevant sections of code. I appreciate any feedback on this issue. Note that our glmFF2 script begins by loading a .mat file specifying the conditions and fieldnames for each contrast image.
The I.Model line is as follows where Drug_con refers to a between-subjects pharmacological treatment with 2 levels and “stimulus” currently has 3 levels: parent, stranger, or math.
I.Model = 'Drug_con*stimulus + random(subID|stimulus)';
The posthocs commented out below are examples of the format that result in the aforementioned error. The 1st posthoc listed runs but produces an Fcontrast image that returns the warning “NaN for out of range arguments” resulting in “NaN, Inf” for the threshold value fields when I open it in FIVE as an overlay.
I.PostHocs = {
'stimulus$parent # stimulus$math' 'parent-math';
%'Drug_con$OXT|stimulus$parent # Drug_con$PLA|stimulus$parent' 'OXT-PLA_parent';
%'Drug_con$PLA|stimulus$parent # Drug_con$PLA|stimulus$math' 'PLA_parent-math';
Like the previous poster, I get the following error:
Error using ANOVA_APS>posthoc (line 580)
Invalid Contrast
Error in ANOVA_APS (line 395)
[ttx1 ttx2 ET df track] = posthoc(posthocs{ii,1},[C
Effects{:}],dat,eTerms);
Error in GLM_Flex_Fast2 (line 51)
MOD = ANOVA_APS(I.Data,I.Model,I.PostHocs,0,1,1);
Error in NP_ATT_MomDad3_noAVP (line 96)
GLM_Flex_Fast2(I);
For completeness, here are the sections of code that created the 1st contrast images:
matlabbatch{3}.spm.stats.con.consess{1}.tcon.name = 'parent';
matlabbatch{3}.spm.stats.con.consess{1}.tcon.convec = [0.5 0.5 0 0 0];
matlabbatch{3}.spm.stats.con.consess{1}.tcon.sessrep = 'none';
matlabbatch{3}.spm.stats.con.consess{2}.tcon.name = 'stranger';
matlabbatch{3}.spm.stats.con.consess{2}.tcon.convec = [0 0 0.5 0.5 0];
matlabbatch{3}.spm.stats.con.consess{2}.tcon.sessrep = 'none';
matlabbatch{3}.spm.stats.con.consess{3}.tcon.name = 'math';
matlabbatch{3}.spm.stats.con.consess{3}.tcon.convec = [0 0 0 0 1];
matlabbatch{3}.spm.stats.con.consess{3}.tcon.sessrep = 'none';
I also have one more question. We want to retain information from regions in which not all participants have data due to signal dropout, but I get the following error if I don’t select DoOnlyAll (and changing the NoMiss or estSmooth parameters hasn’t helped):
Analysing Sub-Model #2 of 505; 121 Observations, across 3 Voxels.Error using *
Inner matrix dimensions must agree.
Error in GLM_Flex_Fast4 (line 680)
Y = I.W{ii}*OD(Xind,vec);
Error in NP_ATT_MomDad3_PH_noAVP_4test (line 97)
GLM_Flex_Fast4(I);
Thank you for your help and all your efforts to create and support these tools!
--
You received this message because you are subscribed to the Google Groups "Aaron's fMRI matlab tools." group.
To unsubscribe from this group and stop receiving emails from it, send an email to fmri_matlab_to...@googlegroups.com.
To post to this group, send email to fmri_mat...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fmri_matlab_tools/72ed2aec-b07b-499d-be2e-cd6ded93d4b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.