I am analyzing data from several trials where individuals were submitted to different stimuli and a biological response was measured. Some individuals participated in more than one trial where the same stimulus was used.
Here is some dummy data that mimics what I have:
Subject Stimulus Response
A 1 44.8
A 1 49.1
A 1 46.5
A 2 10.3
A 2 19.1
B 1 58.1
B 1 79.4
B 3 79.1
B 3 69.2
...
My aim is to determine if patients react differently to different stimuli, but before that, I want to know if their response to the same stimulus is consistent. If so, I am thinking of averaging the multiple observations that individuals have for the same stimulus and then find out if in general the response to different stimuli is different.
My question is: With a structure like this, how do I test if patients have a similar response to the same stimulus?
I read about test-retest reliability, but I am not sure how to do it or if it is applicable to this case. I use R for all my statistical analysis. Any suggestions are welcome.