# What is the correct stat model to test whether there is a significant difference over time and between two conditions whitin participants?

I'm conducting a study using a within-subject repeated-measures design to examine changes in anxiety levels over time.

Participants experience two conditions: salient positive and salient negative.

In the first one, they view 2 neutral images, followed by 3 positive salient images, and followed again by 2 neutral (2 nt, 3 sp, 2nt). For each of them, they need to provide anxiety ratings on a scale from 1 to 10.

In the second condition, they see 2 neutral images followed by 3 salient negative images, and then 2 neutral again (2 nt, 3 sn, 2nt). This sequence of trials is repeated 180 times.

The anxiety ratings data is divided into 7 time bins (corresponding to the number of consecutive trials in a sequence).

I want to statistically test if there are significant changes in anxiety levels over time bins within each condition and if there's a significant difference in anxiety levels between the two conditions in each time bin. How can I achieve that? What is the correct statistical model to test it?

• I recommend looking into multilevel models. Apr 19 at 9:47
• Welcome to CV.SE, _moray. See also my answer here about the need to think carefully about what "difference" means when comparing time series. Apr 19 at 15:45
• Thanks @Alexis! What I want to know specifically, if there is a significant difference in scores between trial 1 and trial 2, trial 2 vs trial 3, trial 3 vs trial 4 , trial 1 vs trial 3 etc. The main hypothesis is that there should be a significant difference between 2 and 3 but no e.g., between 1 and 2. Because the salient stimulus starts in trial 3, it should be stable during 3,4 and 5, and decrease significantly during 6 and 7 ( with no difference between 6/7) (only in the salient negative condition). for the positive, I don't expect to have a sig diff between trials 2-3 and trials 5-6. Apr 21 at 18:00
• Then, I want to compare between the two conditions. Specifically, I want to compare trial 1 of the first condition (salient negative) with trials1 of the second condition (salient positive) , trial 2 cond 1 vs trial 2 cond 2, trial 3 cond 1 vs trial 3 cond 2 etc. What I expect here is that there should be a significant difference between the two conditions only during the salient stimuli (trial 3,4,5) @Alexis Apr 21 at 18:01