Hi,

I need a command/code that help me to get casewise descriptive statistics using "tabstat" without needing to match variables with the same number of observations manually.

Example:
I have the following variables and number of observations in my data set:
Variable Obs
Weight-a 100
Weight-b 90
BMI-a 120
BMI-b 110
Hight-a 70
Hight-b 72
Right now, I type "tabstat Weight-a Weight-b, casewise stat(mean sd min max)" for the Weight variables and a similar one for the BMI variables etc.

What I actually need is to compare Weight-a to Weight-b (90 pairwise obs), BMI-a to BMI-b (110 pairwise obs), and Hight-a to Hight-b (70 pairwise obs), respectively, using one code with the "tabstat" command.

I heard about "loop" and "return list" commands for instance but I don't know how to use them.