Back to PLS Help

Mixed Design PLS Analysis

I'm Online
dliang
Posted on 11/29/18 15:54:01
Number of posts: 2
dliang posts:

Hi,

I am new to using PLS so please excuse me if there is something in the manual that may answer this question that I haven't gotten to yet. Each of the following question are based on conditions set up by the previous question.

Q1: I am trying to run a PLS analysis on a single subject before trying to run it on more subjects. The paradigm is a mixed design fMRI with different durations and number of trials for each condition per run thus I selected a session profile for Blocked fMRI. Would this be the correct choice or should I be using the event related fMRI session profile?

Q2: I can't select single subject analysis as I am getting the error "Matrix dimensions must agree" if I try to merge data across runs. I can however merge data within runs for a single subject analysis. I can also merge data across runs if I don't select single subject analysis. The question here is, does single subject analysis make a difference and what difference would it make? Should I use it for testing or should I drop it entirely?

Q3: When I do try to run a mean-centering PLS analysis, I get "ERROR: no common coords among datamats!" This happens because "Output argument 'num_behav_subj' (and maybe others) not assigned during call to 'fmri_pls_analysis>concat_st_datamat'." This error occurs even when I only have 1 subject in either 1 or more groups. Is there someway to override this argument (manual input) and/or what does this error stem from?

Thanks,

Darren

Replies:

Untitled Post
rmcintosh
Posted on 11/30/18 09:19:55
Number of posts: 394
rmcintosh replies:

quote:

Hi,

I am new to using PLS so please excuse me if there is something in the manual that may answer this question that I haven't gotten to yet. Each of the following question are based on conditions set up by the previous question.

Q1: I am trying to run a PLS analysis on a single subject before trying to run it on more subjects. The paradigm is a mixed design fMRI with different durations and number of trials for each condition per run thus I selected a session profile for Blocked fMRI. Would this be the correct choice or should I be using the event related fMRI session profile?

Q2: I can't select single subject analysis as I am getting the error "Matrix dimensions must agree" if I try to merge data across runs. I can however merge data within runs for a single subject analysis. I can also merge data across runs if I don't select single subject analysis. The question here is, does single subject analysis make a difference and what difference would it make? Should I use it for testing or should I drop it entirely?

Q3: When I do try to run a mean-centering PLS analysis, I get "ERROR: no common coords among datamats!" This happens because "Output argument 'num_behav_subj' (and maybe others) not assigned during call to 'fmri_pls_analysis>concat_st_datamat'." This error occurs even when I only have 1 subject in either 1 or more groups. Is there someway to override this argument (manual input) and/or what does this error stem from?

Thanks,

Darren

Hi Darren:

Q1: I am trying to run a PLS analysis on a single subject before trying to run it on more subjects. The paradigm is a mixed design fMRI with different durations and number of trials for each condition per run thus I selected a session profile for Blocked fMRI. Would this be the correct choice or should I > be using the event related fMRI session profile?

tough one - it may not be possible with the current GUI to extract the information easily. Can you treat it as an event-related and is a time window that will be a reasonable one for all events (like a mean or something?)

>Q2: I can't select single subject analysis as I am getting the error "Matrix dimensions must agree" if I try to merge data across runs. I can however merge data within runs for a single subject analysis. I can also merge data across runs if I don't select single subject analysis. The question here is, does >single subject analysis make a difference and what difference would it make? Should I use it for testing or should I drop it entirely?

May have to do with Q1

>Q3: When I do try to run a mean-centering PLS analysis, I get "ERROR: no common coords among datamats!" This happens because "Output argument 'num_behav_subj' (and maybe others) not assigned during call to 'fmri_pls_analysis>concat_st_datamat'." This error occurs even when I only have > 1 subject in either 1 or more groups. Is there someway to override this argument (manual input) and/or what does this error stem from?

this too may relate to Q1, though it may also be how the data are getting read it.  You can create a binary mask for brain and non-brain and use that rather than a computed threshold.  

 



Untitled Post

I'm Online
dliang
Posted on 11/30/18 10:33:59
Number of posts: 2
dliang replies:

quote:

Hi Darren:

Q1: I am trying to run a PLS analysis on a single subject before trying to run it on more subjects. The paradigm is a mixed design fMRI with different durations and number of trials for each condition per run thus I selected a session profile for Blocked fMRI. Would this be the correct choice or should I > be using the event related fMRI session profile?

tough one - it may not be possible with the current GUI to extract the information easily. Can you treat it as an event-related and is a time window that will be a reasonable one for all events (like a mean or something?)

>Q2: I can't select single subject analysis as I am getting the error "Matrix dimensions must agree" if I try to merge data across runs. I can however merge data within runs for a single subject analysis. I can also merge data across runs if I don't select single subject analysis. The question here is, does >single subject analysis make a difference and what difference would it make? Should I use it for testing or should I drop it entirely?

May have to do with Q1

>Q3: When I do try to run a mean-centering PLS analysis, I get "ERROR: no common coords among datamats!" This happens because "Output argument 'num_behav_subj' (and maybe others) not assigned during call to 'fmri_pls_analysis>concat_st_datamat'." This error occurs even when I only have > 1 subject in either 1 or more groups. Is there someway to override this argument (manual input) and/or what does this error stem from?

this too may relate to Q1, though it may also be how the data are getting read it.  You can create a binary mask for brain and non-brain and use that rather than a computed threshold.  

 

Hi Randy,

 

Thanks for the response!

Follow up to #1: I tried to set up a session profile as an Event Related fMRI however I get the error "Warning: Size vector should be a row vector with integer elements" when trying to generate the ST datamat. PLS does not allow me to use a non-integer variable as a Temporal window size. Let me know if I had interpreted this correctly, the temporal window is the time window of each event on average. Based on that statement, the temporal window size (in scans) of my paradigm at 2.3 TR is ~0.44 TRs/ 1.070 seconds per trial for the main condition and ~1.312 TRs/ 3.0176s for another condition. The other condition more or less only needs to be filtered out of the baseline as it contains text instructions if that helps explain what I'm doing.

The next steps are testing PLS analysis if it works with different selections using the temporal window size of 1.

Follow up to #2: I have isolated the error of "Matrix dimensions must agree" as only pertaining to merge data across runs when single subject analysis is selected in the presence of unequal trials of conditions between runs. This error occurs in both Block fMRI and Event-Related fMRI as long as single subject analysis is selected. This is evident because the error occurs when creating datamat for run #2 condition #1, most likely when fmri_create_datamat.m is building it's array and cannot find equal rows to concatenate.

#Follow up to #3: I do not get this error while running mean-centered PLS analysis as a Event Related fMRI session using the same dataset (1 subject in 1 group) without a binary mask. The conditions selected are listed above with a permutation of 500, bootstrap of 0, and confidence level of 95.

Thanks again,

Darren



Untitled Post
rmcintosh
Posted on 12/01/18 12:20:25
Number of posts: 394
rmcintosh replies:

quote:

Hi Randy,

 

Thanks for the response!

Follow up to #1: I tried to set up a session profile as an Event Related fMRI however I get the error "Warning: Size vector should be a row vector with integer elements" when trying to generate the ST datamat. PLS does not allow me to use a non-integer variable as a Temporal window size. Let me know if I had interpreted this correctly, the temporal window is the time window of each event on average. Based on that statement, the temporal window size (in scans) of my paradigm at 2.3 TR is ~0.44 TRs/ 1.070 seconds per trial for the main condition and ~1.312 TRs/ 3.0176s for another condition. The other condition more or less only needs to be filtered out of the baseline as it contains text instructions if that helps explain what I'm doing.

The next steps are testing PLS analysis if it works with different selections using the temporal window size of 1.

Follow up to #2: I have isolated the error of "Matrix dimensions must agree" as only pertaining to merge data across runs when single subject analysis is selected in the presence of unequal trials of conditions between runs. This error occurs in both Block fMRI and Event-Related fMRI as long as single subject analysis is selected. This is evident because the error occurs when creating datamat for run #2 condition #1, most likely when fmri_create_datamat.m is building it's array and cannot find equal rows to concatenate.

#Follow up to #3: I do not get this error while running mean-centered PLS analysis as a Event Related fMRI session using the same dataset (1 subject in 1 group) without a binary mask. The conditions selected are listed above with a permutation of 500, bootstrap of 0, and confidence level of 95.

Thanks again,

Darren

Hi Darren,

 

RE Point #1, PLS-GUI does not estimate the HRF by default so you may want to use a larger window allow for the response to evolve.  There is a switch to actually use a canonical HRF if you prefer to go that route.

Point #2: yeah, that's an issue for how we coded it, it assumes that your conditions appear in all runs

 

Point #3: odd I am not sure what to make of that TBH




Login to reply to this topic.

  • Keep in touch

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.

  • Follow us on social
  • Facebook
  • Instagram
  • Linkedin
  • Pinterest
  • Twitter
  • YouTube

Contact Us:

3560 Bathurst Street
Toronto, Ontario
Canada M6A 2E1
Phone: (416) 785-2500

Baycrest is an academic health sciences centre fully affiliated with the University of Toronto