manybabies / mb2-analysis

Analysis scripts for MB2
MIT License
7 stars 10 forks source link

Add first look analysis #83

Closed mzettersten closed 5 months ago

mzettersten commented 9 months ago

Right now, we only have code for confirmatory analyses using proportion looking. This issue is to track work on the first look analysis.

There is also a worry about the definition of a first look in the registered report: "First saccades will be determined as the first change in gaze occurring within the anticipatory time window that is directed towards one of the AOIs. The first look is then the binary variable denoting the target of this first saccade (i.e., either the correct or incorrect AOI) and is defined as the first AOI where participants fixated at for at least 150 ms, as in Rayner et al. (2009). The rationale for this definition was that, if participants are looking at a location within the tunnel exit AOIs before the anticipation period, they might have been looking there for other reasons than action prediction. We therefore count only looks that start within the anticipation period because they more unambiguously reflect action predictions. This further prevents us from running into a situation where we would include a lot of fixations on regions other than the tunnel exit AOIs because participants are looking somewhere else before the anticipation period begins"

Two issues:

  1. Are we sure we want to exclude looks that are starting at one of the two tunnel exit AOIs?
  2. What counts as a change? E.g. do within AOI fixation shifts count? Or is a change in gaze based on changing from one AOI to the other? We need to define this a bit more precisely (and then e.g. decide if we need to process the data into fixations, or what AOIs count in the "change in AOI" interpretation.
mzettersten commented 5 months ago

Started working on this, first stab at a function is now added!

mzettersten commented 5 months ago

@tobiasschuwerk: could you take a quick peek at the issue above before the next hackathon se we can pick up the conversation?

mzettersten commented 5 months ago

Additional question: how do we handle NAs at onset - probably we need to ignore them rather than treat them as separate "fixations"??

alvinwmtan commented 5 months ago

We should disallow NAs as a looking target, but not discard them (because we need them to calculate time until first look).

If we want to include within-AOI fixation shifts, we would need a better definition of what counts as a fixation shift (some tolerance on the x and y positions?)

mzettersten commented 5 months ago

Yeah, I think we would need to process the data into fixations in general - but I sort of think we probably don't want to go that route, given thatit isn't really in the registered report and it would involve a more intense transformation of the data?

tobiasschuwerk commented 5 months ago

The topic whether we want to process data into fixations came up a few times in the past, but was so far always postponed to later/exploratory analyses. So the main focus is on unprocessed raw data. I should try to keep it that way. Regarding the definition from the RR: it works for some, but not all patterns, as you already mentioned, @mzettersten: I am listing locations before anticipatory period, first look (at least 150 ms) in anticipatory period, and how it can be classified:

I think it would be more accurate to define "only target" as correct. Do you agree? Does this work? We would then have to document this deviation from the preregistration. The argument is that we can not run this analysis without converting the data into fiaxations and saccades.

mzettersten commented 5 months ago

@tobiasschuwerk 1) I agree that it would make sense to treat first looks that just stay on the target ("only target") as valid looks for the primary analysis (we can always look at it both ways).

2) I think we only want to count looks to either the target or distractor/ AOI exits as a first look, based on my reading of the Registered Report (and I think this makes sense in general). Here's the text I'm looking at:

First saccades will be determined as the first change in gaze occurring within the anticipatory time window that is directed towards one of the AOIs. The first look is then the binary variable denoting the target of this first saccade (i.e., either the correct or incorrect AOI) and is defined as the first AOI where participants fixated at for at least 150 ms, as in Rayner et al. (2009). The rationale for this definition was that, if participants are looking at a location within the tunnel exit AOIs before the anticipation period, they might have been looking there for other reasons than action prediction. We therefore count only looks that start within the anticipation period because they more unambiguously reflect action predictions. This further prevents us from running into a situation where we would include a lot of fixations on regions other than the tunnel exit AOIs because participants are looking somewhere else before the anticipation period begins.

A few reasons to not count looks to somewhere other than the two tunnel exit AOIs as first looks (other than I think this would represent a deviation from the registered report) is that if we count looks to "other" as valid first looks, it makes it difficult to identify a chance level (looks will predominantly be classified as "incorrect"), and it mixes together many different types of responses (e.g., shifts in looking between AOIs, delays in shifting towards the AOIs, moments of inattention, checking back to the tunnel beginning, etc.) as "incorrect", which would make any analysis much more difficult to interpret, in my opinion. But I might be thinking about this the wrong way?

So my reading is that we treat the first look as the first time infants land on the "target" or "distractor" tunnel exit AOI for at least 150 ms, within the anticipatory window. And then we just need to decide if the infant staying on the target/ distractor "counts", as discussed in (1).

tobiasschuwerk commented 5 months ago

@mzettersten : I totally agree, only count looks to either the target or distractor/ AOI exits as a (relevant) first look. I just listed all possible combinations, mostly for myself to sort things in my head;).

And: I vote for staying on the target/ distractor "counts"

mzettersten commented 5 months ago

Gotcha gotcha perfect! Maybe let's touch base about this one more time on Friday

mzettersten commented 5 months ago

Did some more work on this, incorporating some code improvements from @alvinwmtan and introducing the distinction between first valid look and first "shift" to a valid location, ignoring NAs. I think there is still some discussion needed about the NA issue.

One piece of good news is that it seems that the "first valid look" vs. "first valid shift" distinction makes very little difference in practice!!

mzettersten commented 5 months ago

Resolved remaining discussion points in the previous hackathon. There's still some work to do in terms of computing first looks for familiarization trials and adding the preregistered Bayesian analyses, but I'm going to close this issue now given that we've finalized the main function for computing first looks.