I have a string variable
var1
x
y
z
that I need to "duplicate" and append to give
var1 var2
x x
x y
x z
--------
y x
y y
y z
--------
z x
z y
z z
where I added the horizontal lines to facilitate reading. Is such an expansion possible in Stata without loops? (I am not sure if "duplicate" is the right term.)