Hello...
I would like to apply PLS on data of EEG activity... In my case, I have two groups (g1 and g2), both with 5 subject (s1,s2,s3,s4,s5) and two conditions (c1, c2).
Then I built my datamat_1st has the shape {1x2 cell} . The rows for a group1, cell {1,1} are; (g1c1s1, g1c1s2,....g1c1s5,g1c2s1,...g1c2s5), and the same for group2.
When I run the PLScmd, I have an error :" ??? Undefined function or variable 'datamat_lst'", but in the Workspace of Matlab is my datamat_1st defined.
How can I find out if datamat_1st is well built?...Why have I an error?
Thank you very much in advance. Best regards, Isa
Please let me know whether you have problem to run the above scripts.
No, Ihaven´t
problem to run the above scripts.
If I run
the PLS with other datamat_1st (with my data), I have problems. My data are exported
to Matlab from BrainVision Analyzer in format ASCII,multiplexed (with *.txt). When
I run the PLScmd, I have one of these two errors:1-" ??? Undefined
function or variable 'datamat_lst'", but in the Workspace of Matlab is my
datamat_1st defined.....Or... 2- "??? Error using ==> single.... Conversion
to single from cell is not possible.... Error in ==> pls_analysis at 202....
datamat_lst{grp} = single(datamat_lst{grp});".And I don´t know because they occur... Thanks for
helping me. . Best regards, Isa
Untitled Post
I'm Online
jshen
Posted on 10/20/10 12:07:34
Number of posts: 291
If you want, I can help you to take a look at your data. If that's the case, you need to save your data into a .mat file. Then upload it onto whereever that I can access, and send me the link (please do not send via email).
Untitled Post
I'm Online
nlobaugh
Posted on 10/20/10 12:11:26
Number of posts: 229
Isa.. we do have the capability to run the EEG analysis in the GUI. If your txt files are channels by timepoints or timepoints by channels, you can read them in after setting up an 'electrode' file. I can help you set that up if the instructions in the online help are not clear.
I'm wondering if your datamat is in the right format -
You should have a 2 x 1 cell array for datamat_lst, where each cell is a 'double' array of size Ncondition*Ssubjects x Ttimepoint*Cchannel, where subjects are nested within conditions, one for each group. If your text files are being loaded as cell arrays, you would need to convert them as you reshape them into a vector to build the datamat for each group..
nancy
PLS on data of EEG activity
Isa.Tejelo
Posted on 10/20/10 13:28:37
Number of posts: 7
quote:
If you want, I can help you to take a look at your data. If that's the case, you need to save your data into a .mat file. Then upload it onto whereever that I can access, and send me the link (please do not send via email).
Thanks for helping me...The Link is: Plscmd@gmail.com.....Password: isabel11.....
PLS on data of EEG activity
Isa.Tejelo
Posted on 10/20/10 13:44:08
Number of posts: 7
quote:
Isa.. we do have the capability to run the EEG analysis in the GUI. If your txt files are channels by timepoints or timepoints by channels, you can read them in after setting up an 'electrode' file. I can help you set that up if the instructions in the online help are not clear.
I'm wondering if your datamat is in the right format -
You should have a 2 x 1 cell array for datamat_lst, where each cell is a 'double' array of size Ncondition*Ssubjects x Ttimepoint*Cchannel, where subjects are nested within conditions, one for each group. If your text files are being loaded as cell arrays, you would need to convert them as you reshape them into a vector to build the datamat for each group..
nancy
Thanks for helping me...I send a Link with my datamat_1st, because I don´t know if I am doing something wrong...
Untitled Post
I'm Online
jshen
Posted on 10/20/10 13:50:15
Number of posts: 291
I carefully checked your data, and found 2 problems:
1. datamat_1st should be datamat_lst.mat. This is just a typo, and that's why you have error message "??? Undefined function or variable 'datamat_lst"
2. You have 2 cell arrays to input, that seems right; however, within each cell array, you have another 10 cell arrays: datamat_lst{1} [500x32 double] [500x32 double] [500x32 double] [500x32 double] [500x32 double] [500x32 double] [500x32 double] [500x32 double] [500x32 double] [500x32 double] This is incorrect.
It should look like: datamat_lst: {[10x16000 double] [10x16000 double]} When I type datamat_lst{1}, it should give me a 10 by 16000 matrix, which is the datamat for group 1. When I type datamat_lst{2}, it should give me a 10 by 16000 matrix, which is the datamat for group 2.
Please let me know if you have further questions.
Untitled Post
Isa.Tejelo
Posted on 10/20/10 14:43:27
Number of posts: 7
quote:
I carefully checked your data, and found 2 problems:
1. datamat_1st should be datamat_lst.mat. This is just a typo, and that's why you have error message "??? Undefined function or variable 'datamat_lst"
2. You have 2 cell arrays to input, that seems right; however, within each cell array, you have another 10 cell arrays: datamat_lst{1} [500x32 double] [500x32 double] [500x32 double] [500x32 double] [500x32 double] [500x32 double] [500x32 double] [500x32 double] [500x32 double] [500x32 double] This is incorrect.
It should look like: datamat_lst: {[10x16000 double] [10x16000 double]} When I type datamat_lst{1}, it should give me a 10 by 16000 matrix, which is the datamat for group 1. When I type datamat_lst{2}, it should give me a 10 by 16000 matrix, which is the datamat for group 2.
Please let me know if you have further questions.
Thanks... Please, can you
tell me exactly the order of the columns?.... How can I built it?
Untitled Post
I'm Online
nlobaugh
Posted on 10/20/10 14:52:53
Number of posts: 229
I would suggest you reshape each matrix to be timepoints within channel (t1c1..t500c1,t1c2...t500c2)..
However, you will have some challenges to visualize the results if you do not use the ERP module in the PLS_GUI
If your 32 channels match the list provided with the 'Edit Channel order' window in the PLSGUI, I would suggest you generate your datamats and run the analysis there See section 5.3. Creating ERP session file in the online help
nancy
Untitled Post
I'm Online
jshen
Posted on 10/20/10 14:58:47
Number of posts: 291
Nancy is absolute right. I also suggest that you had better use PLSgui to make your life easy.
In case that the limited ERP channels listed in the GUI (BESAThetaPhi, ERP128, ERP256) does not match your situation, it is not a big deal. The main purpose is to provide a better spatial allocation of the channels. In other words, as long as you remember which channel in the GUI matches which channel in your situation, you can choose any of the channel configuration.
Enter your email above to receive electronic messages from Baycrest, including invitations to programs and events, newsletters, updates and other communications.
You can unsubscribe at any time.
Please refer to our Privacy Policy or contact us for more details.