Trying v.296beta, I have found a problem when running between-subjects (or mixed-model) ANOVA (robust). It runs fine with within-subject factors, but gives an error message when introducing a between-subject one. This is the error message (I also attach below one of my windowed data):
I had not this problem with v.2.95
Error using horzcat
Dimensions of arrays being concatenated are not consistent.
Error in ep_loadANOVA (line 156)
specList=[specList find(~cellfun(@isempty,betweenVars.betweenName))];
Error in ep (line 8136) [ANOVAheader, ANOVAdata] = ep_loadANOVA(ANOVAfiles{theFile},EPmain.anova.data);
Error while evaluating UIControl Callback.
Another question: 499999 simulation runs for bootstrapping as default preference? is half a million your present recomendation or is it a mistake?
I have indeed increased the number of bootstrapping runs. For some analyses, I found it was needed to maintain the desired level of stability. Needless to say, faster computers helpful! I'll also need a screenshot of your ANOVA function settings.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Okay, I figured it out! It was a bug introduced by my effort to support ANOVA text files without headers. Download the fixed beta from the link I gave you and try it out.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi!
Now ANOVA runs fine, but... problem to read saved ACP files appears again. You can see the error message below
Moreover, I notice something weird: the ACP files created with 2.96beta are very heavy (from 3 MB with v295 to 375 MB with v296). The only difference between them is the specification of the session. Is this ok?
I can not attach the file because of its weight. Hope you can download it from this link:
Glad to hear it fixed the problem! I wasn't able to replicate your error with the new file. You'll need to give me more information. Were you just reading it using the Read function? Could you send a screencap? As for the size, I used the new Memory pane of the Edit function and it revealed that the reason it is so large is because of the new History logging. It looks like you made a bunch of edits to the file (adding specs information) and it is logging each time you added a single value and it is saving a copy of the entire table each time it does so. I'll need to rethink how the logging works so it doesn't take up so much space!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm sorry to hear you can't replicate my error. I read ACP files with the Read function.
I replicate the whole process today, from importing BV averaged data (txt files) to the two-steps spatio-temporal ACP (now I didn't add specs to avoid increasing the files weigth).
In the zip-file attached, you find see the 3 .ept files, and also a video-screen-capture where you can see that I can read the file with the imported EEG data and the one with the temporal ACP, but if fails when reading the spatio-temporal ACP file.
I am using Matlab 2021a, but also tried with 2022a with the same error.
I'm sorry bother you with my problem. I hope you can help me!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I assume you mean "PCA" not "ACP"? Anyway, I see the crash in your video but I still can't replicate it so I can't fix it. Could you send me the output of "ver"? Also the messages you get in the command window when you start up the EP Toolkit. Also, in the tutorial troubleshooting section, it explains how to use Stop on Errors to send me a test file containing the state of the variables at the moment of the crash. That would be extremely helpful.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks for your interest, I am really bothering you a lot!
I just uploaded to the OneDrive folder above a couple of screenshots with the version information (2.96) and the test files with error information from two computers (PC1 and PC2).
I have to say that I just installed the toolkit on a 3rd PC, at home, and... I can read the file! therefore, I am even more confused now, but I can continue my work.
And sorry for my bad English, yes, of course I meant PCA :-(
Really, I'm so grateful to you for your help
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
With the files you sent me, I can see that the crash is happening because the code has somehow gotten to a spot that it should not have reached and on my computer is working fine. If you are willing to invest some more time in figuring this out, could you put a breakpoint on line 4452 of the ep_readData file (click on the line number and a red dot will appear) and then try reading the file again? When it stops (because it has reached the breakpoint), save the contents of the workspace again like you did before and post it on your sharepoint directory so I can look at it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Other issue (sorry!):
The final v2.96 version crashs again when running robust-ANOVA with between-subject factors (the issue you had solve on may, 8th).
You can find the relevant files (settings, version, test.mat file) in the sharepoint (subdirectory 20220520_rANOVA_between_fail_v296). Below you can see the error message in the command window:
Commencing ANOVA run. This may take some time. You may monitor its progress by opening the html output file with a browser and periodically reloading it.
ML_AutoPCA_ACPst-TF01SF2
Index exceeds the number of array elements. Index must not exceed 0.
Error in ep_ADF (line 373)
if covariate(theFactor)~=2
Okay, I'm starting to narrow in on what is going on with your PCA file. But there is something that still doesn't add up. The error is happening because, according to your test file, the PCA file didn't have the eloc electrode coordinates info but did have the name of the CED file and when it tried to get the info from it, it got thrown because that bit of code wasn't expecting to be doing this for a PCA file, which normally inherits the eloc information from the original average file. What is confusing me is that the PCA file you sent me does actually have the eloc info, which is inconsistent with the test file you sent me. Is it possible that you sent me a different PCA file from what you were using when you got the error? If not, it'll take some more sleuthing to figure out how this happened. Anyway, I'll make a fix to handle this situation for the future.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Mmmm, I think I sent you the correct files but maybe not.
Anyway, I redid it now from the beginning: A new spatiotemporal PCA file (20220526_ML_rec_12av_ACPst.ept) and the error test file (resulting of running 'READ' after putting a breakpoint on line 4452 of the ep_readData file): 20220526_test.mat
You can find this new two files in my sharepoint.
Thanks again for your patience!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I still can't replicate how your file runs into the triggering conditions of having no eloc info but I'm sending you a possible fix. Try it out and let me know.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
All my fault, Dien! I am embarrassed to bother you uselessly. You couldn't replicate my error with good reason:
After testing and testing again (because your fix didn't work) I realised the problem was with my File Preferences: I had checked the "No internal CED" checkbox. I had misunderstood the tutorial and thought that this option only applied when importing external files. Therefore, the published v.296 did not need any fix in this regard.
The only question now (if you still want to hear me) is the error when trying to run ANOVA with more than on between-subjects factor (I posted this error above).
I hope you can excuse me for annoying you uselessly!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No problem! It was a genuine bug, if a bit of a specialized scenario. Fixed now. The ANOVA bug seems to come up because I broke the between-group code for more than one factor when I added the support for conventional ANOVAs. I'm sending you a fix for you to try out.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi again, Joe
Trying v.296beta, I have found a problem when running between-subjects (or mixed-model) ANOVA (robust). It runs fine with within-subject factors, but gives an error message when introducing a between-subject one. This is the error message (I also attach below one of my windowed data):
I had not this problem with v.2.95
Error using horzcat
Dimensions of arrays being concatenated are not consistent.
Error in ep_loadANOVA (line 156)
specList=[specList find(~cellfun(@isempty,betweenVars.betweenName))];
Error in ep (line 8136)
[ANOVAheader, ANOVAdata] = ep_loadANOVA(ANOVAfiles{theFile},EPmain.anova.data);
Error while evaluating UIControl Callback.
Another question: 499999 simulation runs for bootstrapping as default preference? is half a million your present recomendation or is it a mistake?
Thank you very much!
I have indeed increased the number of bootstrapping runs. For some analyses, I found it was needed to maintain the desired level of stability. Needless to say, faster computers helpful! I'll also need a screenshot of your ANOVA function settings.
Here is the screenshot.
Okay, I figured it out! It was a bug introduced by my effort to support ANOVA text files without headers. Download the fixed beta from the link I gave you and try it out.
Hi!
Now ANOVA runs fine, but... problem to read saved ACP files appears again. You can see the error message below
Moreover, I notice something weird: the ACP files created with 2.96beta are very heavy (from 3 MB with v295 to 375 MB with v296). The only difference between them is the specification of the session. Is this ok?
I can not attach the file because of its weight. Hope you can download it from this link:
https://nubeusc-my.sharepoint.com/:f:/g/personal/rodriguez_holguin_usc_es/EjIem9OvSG5ChAFwImV0YfsBlahI_wcaR-Z5FhgrQohm7Q?e=cpK0ds
Index in position 1 exceeds array bounds (must not exceed 1).
Error in ep_addEloc (line 516)
if ~squeeze(any(any(any(any(sum(EPdataIn.data(EEGchans,:,:,:,:,:,:),1))))))
Error in ep_readData (line 4464)
[EPdata]=ep_addEloc(whichCED,EPdata.eloc,EPdata.fileFormat,EPdata,silent);
Error in ep>readFiles (line 13446)
EPdata=ep_readData(inArg);
Error in ep (line 5221)
readFiles(theHandles,importFormat,dataType);
Error while evaluating UIControl Callback.
Glad to hear it fixed the problem! I wasn't able to replicate your error with the new file. You'll need to give me more information. Were you just reading it using the Read function? Could you send a screencap? As for the size, I used the new Memory pane of the Edit function and it revealed that the reason it is so large is because of the new History logging. It looks like you made a bunch of edits to the file (adding specs information) and it is logging each time you added a single value and it is saving a copy of the entire table each time it does so. I'll need to rethink how the logging works so it doesn't take up so much space!
I'm sorry to hear you can't replicate my error. I read ACP files with the Read function.
I replicate the whole process today, from importing BV averaged data (txt files) to the two-steps spatio-temporal ACP (now I didn't add specs to avoid increasing the files weigth).
In the zip-file attached, you find see the 3 .ept files, and also a video-screen-capture where you can see that I can read the file with the imported EEG data and the one with the temporal ACP, but if fails when reading the spatio-temporal ACP file.
I am using Matlab 2021a, but also tried with 2022a with the same error.
I'm sorry bother you with my problem. I hope you can help me!
Sorry, the zip file is too large; you can find it in the link above
I assume you mean "PCA" not "ACP"? Anyway, I see the crash in your video but I still can't replicate it so I can't fix it. Could you send me the output of "ver"? Also the messages you get in the command window when you start up the EP Toolkit. Also, in the tutorial troubleshooting section, it explains how to use Stop on Errors to send me a test file containing the state of the variables at the moment of the crash. That would be extremely helpful.
I just released 2.96, which includes a fix for the unexpectedly large History records that you ran into.
Thanks for your interest, I am really bothering you a lot!
I just uploaded to the OneDrive folder above a couple of screenshots with the version information (2.96) and the test files with error information from two computers (PC1 and PC2).
I have to say that I just installed the toolkit on a 3rd PC, at home, and... I can read the file! therefore, I am even more confused now, but I can continue my work.
And sorry for my bad English, yes, of course I meant PCA :-(
Really, I'm so grateful to you for your help
With the files you sent me, I can see that the crash is happening because the code has somehow gotten to a spot that it should not have reached and on my computer is working fine. If you are willing to invest some more time in figuring this out, could you put a breakpoint on line 4452 of the ep_readData file (click on the line number and a red dot will appear) and then try reading the file again? When it stops (because it has reached the breakpoint), save the contents of the workspace again like you did before and post it on your sharepoint directory so I can look at it.
Done (hoping well). You can find the output in '20220520_reading_ept_test.mat'
Other issue (sorry!):
The final v2.96 version crashs again when running robust-ANOVA with between-subject factors (the issue you had solve on may, 8th).
You can find the relevant files (settings, version, test.mat file) in the sharepoint (subdirectory 20220520_rANOVA_between_fail_v296). Below you can see the error message in the command window:
Commencing ANOVA run. This may take some time. You may monitor its progress by opening the html output file with a browser and periodically reloading it.
ML_AutoPCA_ACPst-TF01SF2
Index exceeds the number of array elements. Index must not exceed 0.
Error in ep_ADF (line 373)
if covariate(theFactor)~=2
Error in ep_ADF (line 993)
ep_ADF(constantY, constantNX, OPT1, ANOVAoptions, OPT2, factorNames, levelNames, factorGroupNames(otherFacs), levelGroupNames(otherFacs), elecFactors, sessFactors, alpha, followup+1, OPT3, SCALE, LOC1, LOC2, outfid, factorNames(withinFactorList), factorGroupNames(retainedFactors), theHeader, allPostHoc, posthocdata);
Error in ep (line 8239)
ep_ADF(Y, ANOVAdata.subjects, trimOption, EPmain.preferences.anova, ANOVAmethod, factorNames, levelNames, factorGroupNames, levelGroupNames, elecFactors, sessFactors, alpha, 0, 0, 1, 0, 0, outfid,[],[], ANOVAheader, EPmain.anova.allPosthoc, ANOVAinfo);
Error while evaluating UIControl Callback.
Okay, I'm starting to narrow in on what is going on with your PCA file. But there is something that still doesn't add up. The error is happening because, according to your test file, the PCA file didn't have the eloc electrode coordinates info but did have the name of the CED file and when it tried to get the info from it, it got thrown because that bit of code wasn't expecting to be doing this for a PCA file, which normally inherits the eloc information from the original average file. What is confusing me is that the PCA file you sent me does actually have the eloc info, which is inconsistent with the test file you sent me. Is it possible that you sent me a different PCA file from what you were using when you got the error? If not, it'll take some more sleuthing to figure out how this happened. Anyway, I'll make a fix to handle this situation for the future.
Mmmm, I think I sent you the correct files but maybe not.
Anyway, I redid it now from the beginning: A new spatiotemporal PCA file (20220526_ML_rec_12av_ACPst.ept) and the error test file (resulting of running 'READ' after putting a breakpoint on line 4452 of the ep_readData file): 20220526_test.mat
You can find this new two files in my sharepoint.
Thanks again for your patience!
I still can't replicate how your file runs into the triggering conditions of having no eloc info but I'm sending you a possible fix. Try it out and let me know.
All my fault, Dien! I am embarrassed to bother you uselessly. You couldn't replicate my error with good reason:
After testing and testing again (because your fix didn't work) I realised the problem was with my File Preferences: I had checked the "No internal CED" checkbox. I had misunderstood the tutorial and thought that this option only applied when importing external files. Therefore, the published v.296 did not need any fix in this regard.
The only question now (if you still want to hear me) is the error when trying to run ANOVA with more than on between-subjects factor (I posted this error above).
I hope you can excuse me for annoying you uselessly!
No problem! It was a genuine bug, if a bit of a specialized scenario. Fixed now. The ANOVA bug seems to come up because I broke the between-group code for more than one factor when I added the support for conventional ANOVAs. I'm sending you a fix for you to try out.
Great! It runs perfect!
Thank you very much for all your help this weeks. I think I will finally let you rest!