Creating and Assigning Overlapping Events for Nilearn - Best Practices?

Hello everyone, I’m just trying to figure out what the best practice would be when creating my events files for my first level analysis.

I have a behavioural task with two conditions, A and B, and mark them as trial_type A and B. However, I am also concerned with their response type as well as the condition (responses 1, 2, 3, and 4)

I am initially concerned with condition type, but later on also want to compare the response types between condition A and B.

Should I assign my trial type as condition_A_response_1, condition_A_response_2, condition_B_response_1 etc. in my events file, OR alternatively make condition_A, condition_B, response_1, response_2, response_3, and response_4 trial types when creating the events file?

In addition, some of my runs don’t contain certain responses sometimes (e.g. response_3 doesn’t really show up), but all trials for sure have condition_A and condition_B.

Should I just make separate events file for this and how would nilearn handle it if I intend to use the nilearn.glm.first_level.first_level_from_bids() function?

Hi @neural_explorer, and welcome to NeuroStars!

No, that would not be BIDS valid. BIDS expects one events description for a given task.

You can do both! You can include events more granular and broad, even if they overlap. What you decide to model will be dependent on your analysis goal.

By default, it will probably model everything in your events file, so you would just have to edit the design matrix.

Best,
Steven

1 Like

Thanks for the welcome and the prompt response :)! This definitely clears things up. I think I was just worried about the events overlapping and doing something wrong with my analysis. My main question has to do with the two comparing the two conditions A and B, and the 4 response types are an additional subquestion.

Unfortunately, some runs don’t contain all 4 response types so depending on how the whole dataset will look (the study is still ongoing), I might not be able to examine the four responses anyways.

I think my main concern is just having to re-create the events file (with just conditions A and B) and re-running the analysis in case I don’t see the responses across all runs and whether would be good practice (I’m still a PhD student, so it’s a lot of learning for me).

Thanks again for your input! :slight_smile: