Neuroelf Toolbox help with Unnecessary Confounds when creating a GLM
2 views (last 30 days)
Show older comments
Hi! I need help with a specific code that utilizes the NeuroElf toolbox in Matlab. I am using a code that takes vtcs and prts or sdms and creates a GLM. The code is below. When using the code though, I am coming across an error where the code is causing some of my variables to show up as confounds when analyzing the GLM in Brain Voyager. I am not sure where in the code this is happening. I set the orthogonal configuration ('orthconf' in code) to false, however this has not solved the issue. My sdm contains 10 variables, and specifies that the confounds are after the 10th variable, so it is defintiely not an error in the sdm. Here is the wiki page for this script if it helps: http://neuroelf.net/wiki/doku.php?id=mdm.computeglm
Thanks in advance!!
% locate filenames...
cd 'C:\Users\ss4404\Desktop\SAMP\Variability_Project\Code\Creating_MDMsGLMs'
vtcs = findfiles('vtc',pwd);
sdms = findfiles('sdm',pwd);
if numel(vtcs) ~= numel(sdms)
error('Number of VTCs and PRTs must match!');
end
% locate realignment parameter files
%rps = findfiles([pwd '/M*/func/r*'], 'rp*.txt', 'depth=1');
rps = findfiles('txt',pwd);
% create MDM
mdm = xff('new:mdm');
mdm.RFX_GLM = 1;
mdm.PSCTransformation = 1;
mdm.NrOfStudies = numel(vtcs);
mdm.XTC_RTC = [vtcs(:), sdms(:)];
% optionally save MDM, .SaveAs without argument opens a dialog!
% mdm.SaveAs;
% ComputeGLM options
opts = struct( ...
'motpars', {rps(:)}, ...
'orthconf', 'false',...
'restcond', 'Constant', ...
'robust', true, ...
'tfilter', 160, ...
'tfilttype', 'fourier');
% compute GLM (robust takes a **LONG TIME** ! e.g. for each 200-Volume
% run with 15 regressors between 30 and 60 minutes, depending on the
% hardware used)
glm = mdm.ComputeGLM(opts);
% save GLM
glm.SaveAs;
0 Comments
Answers (0)
See Also
Categories
Find more on Data Types in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!