Hello all,

I have data that is set out with columns divided into Sex; then Labour Force Status (8 categories), then Age in 5 year intervals (11 categories). So the age groups are in the columns next to each other, and the first half of all columns is male. I would like to create variables for male/female and each of the 8 LFS categories, each summed over the first 10 age categories. The rows are area codes.

I am struggling to code a couple of loops that will achieve this. Thanks for bearing with me, I know a data sample would be helpful here. I am also struggling to install dataex along these lines:

. ssc install dataex
checking dataex consistency and verifying not already installed...
installing into c:\ado\plus\...
could not rename c:\ado\plus\stata.trk to c:\ado\plus\backup.trk
r(699);

Thanks heaps