How do you organize your event file(s) when running many different types of analyses?

I am just curious how other people do this.

Let’s say we have a study, and we have a huge behavioural data file from PsychoPy which has many columns. Let us also assume my study is complex, so a single trial type could be modelled in many different ways depending on what question you’re asking. So using this behavioural data, I am generating event files. Ideally the event file I’m using is a stripped-down and targeted version of the behavioural data, with the irrelevant parts removed and potentially where trial types are modified.

When converting your data to BIDS, although you don’t need an events.tsv file, it does warn you if you don’t have one.

Let’s say I am interesting in 2 different questions that I can ask to this data, each being a different GLM, and each being a different way of modelling events. (For example, I may have 2 categories: words and pictures however the 2 categories may have 3 sub-categories: places, faces, objects (picObj) and concrete nouns, abstract nouns and verbs) in one model, I may model each sub-category separately and create an event file with 6 event types (picObj), or also I could merge all stimuli to 2 categories and make a model accounting the effect of words and pictures (pic) themselves, instead of their specific category. Then, maybe I may be interested in classifying remembered concrete nouns and their difference between remembered objects, etc. etc. So my event trial type may go from pic to picObj to picObjRemembered, picObjForgotten, picObjNoResponse, etc. etc. Depending on the question, I may model and rename my trial types in many different ways.

As you can see, there are plentiful of ways to model the same behavioural data for different analyses, and different event types.

However, BIDS only allows having one event file per functional file. So, technically for something to be BIDS-valid you must remove the old model’s event files and place the new ones, per subject/run.

For my case, I don’t put events into my BIDS dataset when analyzing, instead I have an events folder and each subject’s event file is in that directory, and if I want to try a different model I create a different events folder and run the analysis for that.

My curiousity is: how do other labs take care of all these different kinds of modelling? Because if you try complying with BIDS format, then trying different models becomes difficult, on the other hand being BIDS compliant causes inflexibility.

The issue is you can not put the PsychoPy behavioural data as an events file. It won’t have a trial_type, onset and duration column. It will have plentiful of rows, and sometimes one row can represent many different steps of behavioural responses that occured during the scan. Thus, ,it is not a feasible event file format.

Hi @Tamer_Gezici,

I would put all possible event types in a single events file. You can have additional columns and a README that help users parse what contrasts are used for which analysis. When it comes to your GLM you can just model what you need to model.

Best,
Steven

Thanks Steven,

The issue is, a single row of a PsychoPy behavioural file (or any behavioural data to begin with) may have several events associated with it.

For example, a button press preciding a block start, which could be modelled as two separate events, would end up being in the same row in the event file.

What I understand is that: let’s say we have a GLM which has 3 types of analyses, we can add 3 different columns representing the event type in a single event file. Is that correct?

Hi @Tamer_Gezici,

You can have two rows that have the same onset in your events files. You can have events that overlap in time. Which ones you end up including in your glm will be analysis dependent.

You can only have one trial_type column which is a required column name; but you can have additional columns that are descriptive such as analysis1 that indicates whether a trial type is used for analysis 1. You could also embed that information in the trial type name, e.g., button_press_1 if the onset/duration of these events are corresponding to analysis style 1. As long as there is clear documentation, eg in the README or events.json.

Best,
Steven

1 Like