Hello,
I want to create a new variable which is the mean value of a long list of existing variables, i.e.,
observation 1 = mean of var 1
observation 2 = mean of var 2
etc.
In total I have 150 variables with 5000 observations, thus my new variable should contain 150 observations.
Is this possible with the egen or generate command since my new variable would contain substantially less observations compared to the other variables?
Thanks a lot in advance!
I want to create a new variable which is the mean value of a long list of existing variables, i.e.,
observation 1 = mean of var 1
observation 2 = mean of var 2
etc.
In total I have 150 variables with 5000 observations, thus my new variable should contain 150 observations.
Is this possible with the egen or generate command since my new variable would contain substantially less observations compared to the other variables?
Thanks a lot in advance!
Comment