Is there an existing issue for this?
Operating system
Operating system version
- Mac OS Version 12 "monterey"
SPM 12 version
Platform
Platform version
bidspm version
v3.1.0
bidspm branch / commit number
- v4.0.0dev
- main 'b1b767ee'
Expected Behavior
I expected dummy contrasts to be specified after model estimation. Instead I get an error.
BIDS stats model
{
"Name": "default_fedtask_model",
"BIDSModelVersion": "1.0.0",
"Description": "default BIDS stats model for fedtask task",
"Input": {
"task": ["fedtask"],
"space": ["MNI152NLin2009cAsym"]
},
"Nodes": [
{
"Level": "Run",
"Name": "run",
"GroupBy": [
"run",
"subject"
],
"Transformations": {
"Transformer": "",
"Instructions": [
{
"Name": "",
"Inputs": [""]
}
]
},
"Model": {
"X": [
"trial_type.H_post",
"trial_type.H_pre",
"trial_type.congruent",
"trial_type.control",
"trial_type.incongruent",
"trial_type.not_updated",
"trial_type.updated",
"1",
"trans_?",
"rot_?",
"non_steady_state_outlier*",
"motion_outlier*"
],
"Type": "glm",
"HRF": {
"Variables": [
"trial_type.H_post",
"trial_type.H_pre",
"trial_type.congruent",
"trial_type.control",
"trial_type.incongruent",
"trial_type.not_updated",
"trial_type.updated"
],
"Model": "spm"
},
"Options": {
"HighPassFilterCutoffHz": 0.008,
"Mask": {
"desc": ["brain"],
"suffix": ["mask"]
}
},
"Software": {
"SPM": {
"SerialCorrelation": "FAST",
"InclusiveMaskingThreshold": 0.8
}
}
},
"Contrasts": [
{
"Name": "",
"ConditionList": [""],
"Weights": [""],
"Test": "t"
}
],
"DummyContrasts": {
"Test": "t",
"Contrasts": [
"trial_type.H_post",
"trial_type.H_pre",
"trial_type.congruent",
"trial_type.control",
"trial_type.incongruent",
"trial_type.not_updated",
"trial_type.updated"
]
}
},
{
"Level": "Subject",
"Name": "subject",
"GroupBy": [
"subject",
"contrast"
],
"Model": {
"X": [1],
"Type": "glm"
},
"DummyContrasts": {
"Test": "t"
}
},
{
"Level": "Dataset",
"Name": "dataset",
"GroupBy": ["contrast"],
"Model": {
"X": [1],
"Type": "glm"
},
"DummyContrasts": {
"Test": "t"
}
}
],
"Edges": [
{
"Source": "run",
"Destination": "subject"
},
{
"Source": "subject",
"Destination": "dataset"
}
]
}
Current Behavior & Error message
% copy the error you got below
% before the three backticks (```)
Conversion to double from cell is not possible.
Error in specifyDummyContrasts>addSubjectLevelContrastBasedOnPreviousLevels (line 103)
C.C(end, regIdx{iCdt}) = thisContrast.Weights(iCdt);
Error in specifyDummyContrasts (line 77)
C = addSubjectLevelContrastBasedOnPreviousLevels(model, thisContrast);
Error in specifyContrasts (line 64)
[contrasts, counter] = specifyDummyContrasts(model, node, contrasts, counter);
Error in setBatchSubjectLevelContrasts (line 42)
contrasts = specifyContrasts(bm, SPM);
Error in bidsFFX (line 120)
matlabbatch = setBatchSubjectLevelContrasts(matlabbatch, opt, subLabel, nodeName);
Error in cliStats>runContrasts (line 127)
bidsFFX('contrasts', opt);
Error in cliStats (line 86)
runContrasts(isSubjectLevel, opt, nodeName, concatenate);
Error in bidspm>executeAction (line 86)
cliStats(varargin{2:end});
Error in bidspm (line 26)
returnCode = executeAction(action, varargin{:});
Error in test_bidspm (line 48)
bidspm(bids_dir, output_dir, 'subject', ...
Anything else?
error_2026-02-05T13-20.log
Is there an existing issue for this?
Operating system
Operating system version
SPM 12 version
Platform
Platform version
bidspm version
v3.1.0
bidspm branch / commit number
Expected Behavior
I expected dummy contrasts to be specified after model estimation. Instead I get an error.
BIDS stats model
{ "Name": "default_fedtask_model", "BIDSModelVersion": "1.0.0", "Description": "default BIDS stats model for fedtask task", "Input": { "task": ["fedtask"], "space": ["MNI152NLin2009cAsym"] }, "Nodes": [ { "Level": "Run", "Name": "run", "GroupBy": [ "run", "subject" ], "Transformations": { "Transformer": "", "Instructions": [ { "Name": "", "Inputs": [""] } ] }, "Model": { "X": [ "trial_type.H_post", "trial_type.H_pre", "trial_type.congruent", "trial_type.control", "trial_type.incongruent", "trial_type.not_updated", "trial_type.updated", "1", "trans_?", "rot_?", "non_steady_state_outlier*", "motion_outlier*" ], "Type": "glm", "HRF": { "Variables": [ "trial_type.H_post", "trial_type.H_pre", "trial_type.congruent", "trial_type.control", "trial_type.incongruent", "trial_type.not_updated", "trial_type.updated" ], "Model": "spm" }, "Options": { "HighPassFilterCutoffHz": 0.008, "Mask": { "desc": ["brain"], "suffix": ["mask"] } }, "Software": { "SPM": { "SerialCorrelation": "FAST", "InclusiveMaskingThreshold": 0.8 } } }, "Contrasts": [ { "Name": "", "ConditionList": [""], "Weights": [""], "Test": "t" } ], "DummyContrasts": { "Test": "t", "Contrasts": [ "trial_type.H_post", "trial_type.H_pre", "trial_type.congruent", "trial_type.control", "trial_type.incongruent", "trial_type.not_updated", "trial_type.updated" ] } }, { "Level": "Subject", "Name": "subject", "GroupBy": [ "subject", "contrast" ], "Model": { "X": [1], "Type": "glm" }, "DummyContrasts": { "Test": "t" } }, { "Level": "Dataset", "Name": "dataset", "GroupBy": ["contrast"], "Model": { "X": [1], "Type": "glm" }, "DummyContrasts": { "Test": "t" } } ], "Edges": [ { "Source": "run", "Destination": "subject" }, { "Source": "subject", "Destination": "dataset" } ] }Current Behavior & Error message
Anything else?
error_2026-02-05T13-20.log