Hi ,
I have 20 variables representing an outcome measure.
The same outcome/variable was measure twice at t1 and t2.
My setup is wide and I use Stata 16.1:

var1_1 var1_2 var2_1 var2-2............var20_1 var20_2

I would like to use a loop and generate for each pair of variables the difference.
diff_var1==var1_2 -var1_1
diff _var2==var2_2-var2_1
.............................
diff_var20==var20_2-var20_1
Your help would be greatly appreciated.
Thank you,
Nikos