Issues with GLM function on certain files
Thanks Meryem, I'll give that a try! Do you have any ideas as to why the GLM works for for one file but not the others? The data was collected using the same design; only difference is the participant.
I'm following up on this post in case someone encounters a similar issue. It looks like Meryem's suggestion helped fix my issue. I originally had several markers, some of which indicated the end of a condition. I deleted "unecessary" markers such as ones that indicate the end and ran the GLM again with no issues. To streamline the process of removing the stim markers, I referenced this: https://github.com/BUNPC/Homer3/wiki/Standalone-SNIRF-loading-and-saving
Here's some code that may help:
fileNames = dir('*.snirf'); %Get a list of the .snirf files for i = 1:size(fileNames,1) %Loop through all files snirfObj = SnirfClass(fileNames(i).name); %Load the contents of .snirf into the MATLAB workspace snirfObj.stim(1:5) = ; %Remove stim conditions 1 through 5. The indices change based on your requirements snirfObj.Save(fileNames(i).name); %Save your changes end