Confusion over statistical test to use?

#1
Hello,

I will try to provide as much detail as possible, but I hope it isn't too much.

I have a sample size of around 500 unique people. Each person underwent visual field testing over time, and so I have a series of "visual field index" scores for each person, which is a score out of 100, and lower scores are worse. These scores are done for each eye, so some people may only have 2 scores per eye (i have filtered the results to only show people with 2 or more scores), others may have more. The number of scores available for each eye in the same person may differ, ie the left eye may have 5 measurements done with the right eye having 6.

I would like to split the original group of 500 people into two groups, depending on whether or not they have condition x, and then compare if the decrease in visual field index is significantly different between these two groups.

There is also another confounder, in that each eye may have condition y, which does decrease visual field index over time. I could filter the eyes to only show those that do have condition y, or are suspected of having it, and then divide this filtered group into those that have condition x and those that don't. This is probably a good option, as I want to see if condition x worsens deterioration in visual field index in those with condition y, so I would need to make sure the eye actually has condition y.

It is also worth mentioning that I have other measures. For instance, I have intra-ocular pressure for each eye, and it may be worth seeing if this differs in people with condition y? While again, this is available as a series of measurements for each person, I have only extracted the first and last value, the mean, and maximum recorded pressure. I can, however, relatively easily extract the series of values for each eye. Pressure is a confounder as higher pressures may lead to greater deterioration in visual field index.

Thank you in advance for any help, and apologies for the long-winded post.