Dear users,

I would like to please ask for your help concerning the following issue.

I would like to create a variable which contains the maximum of n variables, called x1, x2, ..., xn.
E.g., let n=3. Then, I would like to have
Code:
gen max = max(x1, x2, x3)
Could you please aid me in referencing to x1 up to xn? Like in max = max(of x1-x3).
Alternatively, I would highly appreciate if you could help me how to solve my problem in another way.

Yours sincerely,
Mario