Hello,

I need some help with computing variables using do repeats. it's a daily-diary dataset in which I have variable X and variable Y measured on on 7 consecutive days. What I want to do is compute the mean Y one time only for days in which X is lower than the mean X (across all days), and one time when X is higher than the mean of X.

I can't understand how to this. if anyone can help with the syntax for this, that would great and appreciated.

Thanks

Ben