Hi stata users!

I am using Stata 15.1 on Mac. I want to investigate correlations between two people's responses on a variable. Each pair of people lives on the same "compound", and there are 152 pairs. This is a inter-rater reliability question, and each pair of people is different. I have tried to do this using stata functions icc and spearman, but I can't work out how to do it.

Please can a member advise on the two specific Qs below?

Data excerpt below this message.
- id is a unique id
- c2a is compound code
- p1 is a response to a question on a scale of always, sometimes, rarely, never (coded as 3,2,1,0)

1. Approach using ICC

When I code "icc p1 c2a if treatment == 1" I get an individual ICC of 0.05 (output below this message).
This makes no sense to me because 90% of respondents in the "treatment" group responded "always" for p1, so the icc should be relatively high.
This leads me to suspect I am doing something wrong with the icc command.
Can anyone advise?

2. Approach using Spearman's rank correlation coefficient

I considered restructuring the data by creating variables p1a and p1b (where p1a is person 1's response and p1b is person 2's) and then correlating those variables using the spearman function, then taking the mean of the spearman's rho across the dataset. However, I can't work out the best way of doing the restructuring, and it doesn't strike me as the most robust way of investigating correlations between responses either. Doing the right ICC would be better.
Can anyone advise?

Many thanks!
Ian


+---------------------------+
| id c2a p1 |
|---------------------------|
224. | 300402 3004 always |
225. | 300401 3004 never |
226. | 300902 3009 always |
227. | 300901 3009 never |
229. | 301602 3016 always |
|---------------------------|
230. | 301601 3016 always |
232. | 301901 3019 always |
233. | 301902 3019 always |
236. | 303001 3030 sometimes |
237. | 303002 3030 sometimes |
+---------------------------+


Random effects: c2a Number of targets = 80
Number of raters = 2

--------------------------------------------------------------
p1 | ICC [95% Conf. Interval]
-----------------------+--------------------------------------
Individual | .052705 -.1669207 .2676372
Average | .1001325 -.4007318 .4222615
--------------------------------------------------------------