Hi everyone, this is my first post to Statalist so I kindly request some patience as well as welcome feedback regarding my post format.

I had a long database that I have reshaped to wide.

This is my reshape code:
Array Accordingly, this has generated multiple age and multiple sex variables per observation (e.g. age1, age2, age3), whereas in the original long format, I only had one age and one sex variable per observation. Below you can see an example which also offers more details regarding the storage types, etc.

Array


I would like to merge the age variables into one per observation. I would also like to do the same for the multiple sex variables.

I am also having trouble knowing exactly which term to use to address this issue (i.e. I am still learning the language of STATA). For example, having done my own research, I've learned that I am NOT looking to stack or concatenate (as this would require I reshape back to long).

I therefore have two questions:
1. Can someone please confirm I am looking to MERGE these variables into one new variable #STATALanguage?
2. Can someone please offer guidance as to how I can accomplish this.

Kind regards,
Kate